Class AbstractDocumentCategorizer

java.lang.Object
org.apache.uima.analysis_component.AnalysisComponent_ImplBase
org.apache.uima.analysis_component.Annotator_ImplBase
org.apache.uima.analysis_component.CasAnnotator_ImplBase
opennlp.uima.doccat.AbstractDocumentCategorizer
All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent
Direct Known Subclasses:
DocumentCategorizer, LanguageDetector

abstract class AbstractDocumentCategorizer extends org.apache.uima.analysis_component.CasAnnotator_ImplBase
Abstract document categorizer which can be implemented to define how the output of the DocumentCategorizer should be written into the CAS.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private org.apache.uima.UimaContext
     
     
    private org.apache.uima.cas.Type
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    initialize(org.apache.uima.UimaContext context)
     
    void
    process(org.apache.uima.cas.CAS cas)
     
    protected abstract void
    setBestCategory(org.apache.uima.cas.CAS cas, String bestCategory)
     
    void
    typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem)
     

    Methods inherited from class org.apache.uima.analysis_component.CasAnnotator_ImplBase

    getRequiredCasInterface, process

    Methods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase

    getCasInstancesRequired, hasNext, next

    Methods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase

    batchProcessComplete, collectionProcessComplete, destroy, getContext, getLogger, getResultSpecification, reconfigure, setResultSpecification

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • context

      private org.apache.uima.UimaContext context
    • mCategorizer

      private DocumentCategorizer mCategorizer
    • mTokenType

      private org.apache.uima.cas.Type mTokenType
  • Constructor Details

    • AbstractDocumentCategorizer

      AbstractDocumentCategorizer()
  • Method Details

    • initialize

      public void initialize(org.apache.uima.UimaContext context) throws org.apache.uima.resource.ResourceInitializationException
      Specified by:
      initialize in interface org.apache.uima.analysis_component.AnalysisComponent
      Overrides:
      initialize in class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
      Throws:
      org.apache.uima.resource.ResourceInitializationException
    • typeSystemInit

      public void typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
      Overrides:
      typeSystemInit in class org.apache.uima.analysis_component.CasAnnotator_ImplBase
      Throws:
      org.apache.uima.analysis_engine.AnalysisEngineProcessException
    • setBestCategory

      protected abstract void setBestCategory(org.apache.uima.cas.CAS cas, String bestCategory)
    • process

      public void process(org.apache.uima.cas.CAS cas)
      Specified by:
      process in class org.apache.uima.analysis_component.CasAnnotator_ImplBase