Class AbstractNameFinder

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.namefind.AbstractNameFinder
All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent
Direct Known Subclasses:
DictionaryNameFinder, NameFinder

abstract class AbstractNameFinder extends org.apache.uima.analysis_component.CasAnnotator_ImplBase
Base implementation of a name finder.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.apache.uima.UimaContext
     
    private Boolean
     
    protected org.apache.uima.util.Logger
     
    protected org.apache.uima.cas.Type
     
    protected Map<String, org.apache.uima.cas.Type>
     
    protected org.apache.uima.cas.Type
     
    protected org.apache.uima.cas.Type
     
    protected final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    documentDone(org.apache.uima.cas.CAS cas)
    Called if the current document is completely processed.
    protected abstract Span[]
    find(org.apache.uima.cas.CAS cas, String[] tokens)
     
    protected void
     
    final void
    initialize(org.apache.uima.UimaContext context)
     
    protected abstract void
    postProcessAnnotations(Span[] detectedNames, org.apache.uima.cas.text.AnnotationFS[] nameAnnotations)
     
    final void
    process(org.apache.uima.cas.CAS cas)
    Performs name finding on the given CAS object.
    void
    typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem)
    Initializes the 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

    • name

      protected final String name
    • mSentenceType

      protected org.apache.uima.cas.Type mSentenceType
    • mTokenType

      protected org.apache.uima.cas.Type mTokenType
    • mNameType

      protected org.apache.uima.cas.Type mNameType
    • mNameTypeMapping

      protected Map<String, org.apache.uima.cas.Type> mNameTypeMapping
    • context

      protected org.apache.uima.UimaContext context
    • mLogger

      protected org.apache.uima.util.Logger mLogger
    • isRemoveExistingAnnotations

      private Boolean isRemoveExistingAnnotations
  • Constructor Details

    • AbstractNameFinder

      AbstractNameFinder(String name)
  • Method Details

    • initialize

      protected void initialize() throws org.apache.uima.resource.ResourceInitializationException
      Throws:
      org.apache.uima.resource.ResourceInitializationException
    • initialize

      public final 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
      Initializes the TypeSystem.
      Overrides:
      typeSystemInit in class org.apache.uima.analysis_component.CasAnnotator_ImplBase
      Throws:
      org.apache.uima.analysis_engine.AnalysisEngineProcessException
    • postProcessAnnotations

      protected abstract void postProcessAnnotations(Span[] detectedNames, org.apache.uima.cas.text.AnnotationFS[] nameAnnotations)
    • documentDone

      protected abstract void documentDone(org.apache.uima.cas.CAS cas)
      Called if the current document is completely processed.
    • find

      protected abstract Span[] find(org.apache.uima.cas.CAS cas, String[] tokens)
    • process

      public final void process(org.apache.uima.cas.CAS cas)
      Performs name finding on the given CAS object.
      Specified by:
      process in class org.apache.uima.analysis_component.CasAnnotator_ImplBase