com.raritantechnologies.concept.classifier
Class ClassifierTermExtractorTagger

java.lang.Object
  extended bycom.raritantechnologies.utils.tagging.TermExtractorTagger
      extended bycom.raritantechnologies.concept.classifier.ClassifierTermExtractorTagger
All Implemented Interfaces:
IConfigurable, ITagger, ITermExtractor

public class ClassifierTermExtractorTagger
extends TermExtractorTagger
implements ITermExtractor

Subclass of TermExtractorTagger that uses a IDocumentMatcher instance to generate the term - phrase map.

XML Configuration Template:
  <Tagger class="com.raritantechnologies.concept.classifier.ClassifierTermExtractorTagger"
             defaultAttribute="[ default tag attribute name ]"
             documentClassifier="[ name of DocumentClassifier that owns the DocumentMatcher(s) ]"
             matcherNameParam="[ http request parameter with DYNAMICALLY generated document matcher name ]"
             matcherName="[ alternate: fixed name of document matcher ]"
             returnAllTerms="[ true(default)|false - if false only return terms matching input string ]"
             cachedIndexDocKey="[ optional key to use to get/put cached IndexedDocument ]"
             useCachedIndexDoc="[true|false(default) ]"
             detectSentences="[true|false(default) ]"
             makeThreadSafe="[true|false(default) - if true create session bound tag writer ]"
             tagWithinATags="true|false(default)"
             caseSensitive="true|false(default)" >

    <TagWriter class="[ class of com.raritantechnologies.utils.tagging.ITagWriter ]" >

    </TagWriter>

    <!-- Can specify DocumentClassifier if not present in the configuration elsewhere -->
    <DocumentClassifier name="name of Document Classifier"
                           docMatcherMapAttribute="[ use a doc matcher Attribute such as 'path' ]"  >

    </DocumentClassifier>

  </Tagger>
 

Developed by Raritan Technologies Inc..

Author:
Ted Sullivan

Field Summary
 
Fields inherited from class com.raritantechnologies.utils.tagging.TermExtractorTagger
caseSensitive, tagWithinATags
 
Constructor Summary
ClassifierTermExtractorTagger()
           
 
Method Summary
 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.String getDocumentClassifierName()
           
 java.lang.String getMatcherName()
           
 java.lang.String getMatcherNameParam()
           
 boolean getReturnAllTerms()
           
 void initialize(org.w3c.dom.Element elem)
          Initializes the object from an XML tag or element.
 void setDocumentClassifierName(java.lang.String docClassifierName)
           
 void setMatcherName(java.lang.String matcherName)
           
 void setMatcherNameParam(java.lang.String matcherNameParam)
           
 void setReturnAllTerms(boolean returnAllTerms)
           
 java.lang.String tagWords(java.lang.String sessionID, java.lang.String inputString)
           
 java.lang.String tagWords(java.lang.String sessionID, java.lang.String termSource, java.lang.String inputString)
           
 
Methods inherited from class com.raritantechnologies.utils.tagging.TermExtractorTagger
getAttriute, getConfigurationXML, getTagWriter, getTermExtractor, setAttriute, setTagWriter, setTermExtractor, tagWords
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassifierTermExtractorTagger

public ClassifierTermExtractorTagger()
Method Detail

tagWords

public java.lang.String tagWords(java.lang.String sessionID,
                                 java.lang.String termSource,
                                 java.lang.String inputString)
Overrides:
tagWords in class TermExtractorTagger

tagWords

public java.lang.String tagWords(java.lang.String sessionID,
                                 java.lang.String inputString)
Specified by:
tagWords in interface ITagger
Overrides:
tagWords in class TermExtractorTagger

extractTerms

public java.util.Map extractTerms(java.lang.String sessionID,
                                  java.lang.String fromString)
Description copied from interface: ITermExtractor
returns a map of terms - key is the term, value is either an AttributeWordsTagger or an Attribute string

Specified by:
extractTerms in interface ITermExtractor

initialize

public void initialize(org.w3c.dom.Element elem)
Description copied from interface: IConfigurable
Initializes the object from an XML tag or element. This method is called by the Framework as part of the application initializtion. see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory. Configurable objects that are owned or contained by other configurable objects will be initialized in by the parent object.

Specified by:
initialize in interface IConfigurable
Overrides:
initialize in class TermExtractorTagger

setDocumentClassifierName

public void setDocumentClassifierName(java.lang.String docClassifierName)

getDocumentClassifierName

public java.lang.String getDocumentClassifierName()

setMatcherName

public void setMatcherName(java.lang.String matcherName)

getMatcherName

public java.lang.String getMatcherName()

setMatcherNameParam

public void setMatcherNameParam(java.lang.String matcherNameParam)

getMatcherNameParam

public java.lang.String getMatcherNameParam()

setReturnAllTerms

public void setReturnAllTerms(boolean returnAllTerms)

getReturnAllTerms

public boolean getReturnAllTerms()