|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.concept.classifier.BasicDocumentMatcher
com.raritantechnologies.concept.classifier.RangeDocumentMatcher
Matcher that determines if the number of matches counted by its child matcher is within a defined range.
XML Configuration Template:
<DocumentMatcher class="com.raritantechnologies.concept.classifier.RangeDocumentMatcher"
minCounts="[ number of matches needed for match (default=1) ]"
maxCounts="[ maximum number of matches that will be accepted ]" >
<!-- the Matcher to use to get the number of matches -->
<DocumentMatcher class="[ class of com.raritantechnologies.concept.classifier.IDocumentMatcher ]" >
</DocumentMatcher>
</DocumentMatcher>
| Constructor Summary | |
RangeDocumentMatcher()
|
|
RangeDocumentMatcher(IDocumentMatcher childMatcher,
int childMinCount,
int childMaxCount)
|
|
| Method Summary | |
protected void |
collectPhraseSet(java.util.HashSet phraseSet)
|
protected void |
collectTermSet(java.util.HashSet termSet)
|
void |
extractTerms(IndexedDocument fromDocument,
java.util.HashMap termsMap)
Extracts the matching terms contained in the document. |
void |
extractTerms(IndexedDocument fromDocument,
java.util.Set termsSet)
|
void |
initialize(org.w3c.dom.Element elem)
Initializes the object from an XML tag or element. |
boolean |
matches(IndexedDocument document)
returns true if the matcher matches the IndexedDocument, false otherwise. |
java.lang.String |
render()
Renders a human-readable version of the matcher's logic. |
| Methods inherited from class com.raritantechnologies.concept.classifier.BasicDocumentMatcher |
addAttribute, addTerms, addTermsAsAttributes, extractTerms, getAttribute, getAttributeNames, getMatchCriteria, getMatchCriteria, getName, getPhraseSet, getTermSet, isStopWord, setName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.raritantechnologies.concept.classifier.IDocumentMatcher |
addAttribute, addTermsAsAttributes, getAttribute, getAttributeNames, getMatchCriteria, getMatchCriteria, getName, getPhraseSet, getTermSet, isStopWord, setName |
| Methods inherited from interface com.raritantechnologies.utils.tagging.ITermExtractor |
extractTerms |
| Constructor Detail |
public RangeDocumentMatcher()
public RangeDocumentMatcher(IDocumentMatcher childMatcher,
int childMinCount,
int childMaxCount)
| Method Detail |
public boolean matches(IndexedDocument document)
IDocumentMatcher
matches in interface IDocumentMatchermatches in class BasicDocumentMatcher
public void extractTerms(IndexedDocument fromDocument,
java.util.HashMap termsMap)
IDocumentMatcher
extractTerms in interface IDocumentMatcherextractTerms in class BasicDocumentMatcher
public void extractTerms(IndexedDocument fromDocument,
java.util.Set termsSet)
extractTerms in interface IDocumentMatcherpublic void initialize(org.w3c.dom.Element elem)
IConfigurable
initialize in interface IConfigurableprotected void collectTermSet(java.util.HashSet termSet)
collectTermSet in class BasicDocumentMatcherprotected void collectPhraseSet(java.util.HashSet phraseSet)
collectPhraseSet in class BasicDocumentMatcherpublic java.lang.String render()
IDocumentMatcher
render in interface IDocumentMatcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||