|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.concept.classifier.BasicDocumentMatcher
Base class for IDocumentMatcher implementations.
| Constructor Summary | |
BasicDocumentMatcher()
|
|
| Method Summary | |
void |
addAttribute(java.lang.String attrName,
java.lang.Object attrValue)
DocumentMatcher attributes: These are what are added to documents that are matched by the IDocumentMatcher i.e. |
protected void |
addTerms(java.util.Map tempMap,
java.util.Map termsMap)
|
void |
addTermsAsAttributes(java.lang.String termAttribute,
java.lang.String delimiter)
Calling this method will cause all of the Terms and Phrases contained in this matcher to be added as a matcher attribute or "tag". |
protected abstract void |
collectPhraseSet(java.util.HashSet phraseSet)
|
protected abstract void |
collectTermSet(java.util.HashSet termSet)
|
abstract void |
extractTerms(IndexedDocument fromDocument,
java.util.HashMap termsMap)
Extracts the matching terms contained in the document. |
java.util.Map |
extractTerms(java.lang.String sessionID,
java.lang.String fromString)
returns a map of terms - key is the term, value is either an AttributeWordsTagger or an Attribute string |
java.lang.Object |
getAttribute(java.lang.String attrName)
|
java.util.Iterator |
getAttributeNames()
|
DocumentMatchBean |
getMatchCriteria(IndexedDocument document)
base class method: sets matches to value of matches( ) method. |
DocumentMatchBean |
getMatchCriteria(IndexedDocument document,
java.util.Map termsMap)
returns a DocumentMatchBean containing the match criteria (the category or categories that specify the 'reason' or context of the match. |
java.lang.String |
getName()
|
java.util.Set |
getPhraseSet()
returns the list of phrases in all contained PhraseDocumentMatchers |
java.util.Set |
getTermSet()
returns the list of terms in all contained TermDocumentMatchers |
boolean |
isStopWord(IndexedDocument document)
Adds stop word support. |
abstract boolean |
matches(IndexedDocument document)
returns true if the matcher matches the IndexedDocument, false otherwise. |
void |
setName(java.lang.String name)
Unique key that identifies this IDocumentMatcher |
| 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 |
extractTerms, render |
| Methods inherited from interface com.raritantechnologies.searchApp.IConfigurable |
initialize |
| Constructor Detail |
public BasicDocumentMatcher()
| Method Detail |
public abstract boolean matches(IndexedDocument document)
IDocumentMatcher
matches in interface IDocumentMatcherpublic java.util.Set getTermSet()
IDocumentMatcher
getTermSet in interface IDocumentMatcherpublic java.util.Set getPhraseSet()
IDocumentMatcher
getPhraseSet in interface IDocumentMatcher
public java.util.Map extractTerms(java.lang.String sessionID,
java.lang.String fromString)
ITermExtractor
extractTerms in interface ITermExtractor
public abstract void extractTerms(IndexedDocument fromDocument,
java.util.HashMap termsMap)
IDocumentMatcher
extractTerms in interface IDocumentMatcherfromDocument - The Document to be processedtermsMap - The map into which the extracted terms should be put. The
key of the map is the term that hit. The value is an
AttributeWordTagger that can be used to mark up the
document.protected abstract void collectTermSet(java.util.HashSet termSet)
protected abstract void collectPhraseSet(java.util.HashSet phraseSet)
protected void addTerms(java.util.Map tempMap,
java.util.Map termsMap)
public void setName(java.lang.String name)
IDocumentMatcher
setName in interface IDocumentMatcherpublic java.lang.String getName()
getName in interface IDocumentMatcherpublic DocumentMatchBean getMatchCriteria(IndexedDocument document)
getMatchCriteria in interface IDocumentMatcher
public DocumentMatchBean getMatchCriteria(IndexedDocument document,
java.util.Map termsMap)
IDocumentMatcher
getMatchCriteria in interface IDocumentMatcher
public void addAttribute(java.lang.String attrName,
java.lang.Object attrValue)
IDocumentMatcher
addAttribute in interface IDocumentMatcherpublic java.lang.Object getAttribute(java.lang.String attrName)
getAttribute in interface IDocumentMatcherpublic java.util.Iterator getAttributeNames()
getAttributeNames in interface IDocumentMatcher
public void addTermsAsAttributes(java.lang.String termAttribute,
java.lang.String delimiter)
IDocumentMatcher
addTermsAsAttributes in interface IDocumentMatcherpublic boolean isStopWord(IndexedDocument document)
IDocumentMatcherTermDocumentMatcher.
isStopWord in interface IDocumentMatcher
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||