Class NameFinder

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
opennlp.uima.namefind.NameFinder
All Implemented Interfaces:
org.apache.uima.analysis_component.AnalysisComponent

public final class NameFinder extends AbstractNameFinder
An OpenNLP-based Name annotator.

Mandatory parameters:

Type Name Description
String opennlp.uima.ModelName The name of the model file
String opennlp.uima.SentenceType The full name of the sentence type
String opennlp.uima.TokenType The full name of the token type
String opennlp.uima.NameType The full name of the name type

Optional parameters:

Type Name Description
String opennlp.uima.ProbabilityFeature The name of the double probability feature (not set by default)
Integer opennlp.uima.BeamSize
String opennlp.uima.DocumentConfidenceType
  • Field Details

    • NAME_TYPE_PARAMETER

      public static final String NAME_TYPE_PARAMETER
      See Also:
    • NAME_TYPE_MAP_PARAMETER

      public static final String NAME_TYPE_MAP_PARAMETER
      See Also:
    • TOKEN_PATTERN_OPTIMIZATION

      public static final String TOKEN_PATTERN_OPTIMIZATION
      See Also:
    • TOKEN_FEATURE_PARAMETER

      public static final String TOKEN_FEATURE_PARAMETER
      See Also:
    • TOKEN_FEATURE_PREV_WINDOW_SIZE_PARAMETER

      public static final String TOKEN_FEATURE_PREV_WINDOW_SIZE_PARAMETER
      See Also:
    • TOKEN_FEATURE_NEXT_WINDOW_SIZE_PARAMETER

      public static final String TOKEN_FEATURE_NEXT_WINDOW_SIZE_PARAMETER
      See Also:
    • TOKEN_CLASS_FEATURE_PARAMETER

      public static final String TOKEN_CLASS_FEATURE_PARAMETER
      See Also:
    • TOKEN_CLASS_FEATURE_PREV_WINDOW_SIZE_PARAMETER

      public static final String TOKEN_CLASS_FEATURE_PREV_WINDOW_SIZE_PARAMETER
      See Also:
    • TOKEN_CLASS_FEATURE_NEXT_WINDOW_SIZE_PARAMETER

      public static final String TOKEN_CLASS_FEATURE_NEXT_WINDOW_SIZE_PARAMETER
      See Also:
    • mNameFinder

      private NameFinderME mNameFinder
    • probabilityFeature

      private org.apache.uima.cas.Feature probabilityFeature
    • documentConfidenceType

      private org.apache.uima.cas.Type documentConfidenceType
    • documentConfidenceNameTypeFeature

      private org.apache.uima.cas.Feature documentConfidenceNameTypeFeature
    • documentConfidenceFeature

      private org.apache.uima.cas.Feature documentConfidenceFeature
    • documentConfidence

      private Mean documentConfidence
  • Constructor Details

  • Method Details

    • initialize

      public void initialize() throws org.apache.uima.resource.ResourceInitializationException
      Initializes the current instance with the given context.

      Note: Do all initialization in this method, do not use the constructor.

      Overrides:
      initialize in class AbstractNameFinder
      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 type system.
      Overrides:
      typeSystemInit in class AbstractNameFinder
      Throws:
      org.apache.uima.analysis_engine.AnalysisEngineProcessException
    • find

      protected Span[] find(org.apache.uima.cas.CAS cas, String[] tokens)
      Specified by:
      find in class AbstractNameFinder
    • postProcessAnnotations

      protected void postProcessAnnotations(Span[] detectedNames, org.apache.uima.cas.text.AnnotationFS[] nameAnnotations)
      Specified by:
      postProcessAnnotations in class AbstractNameFinder
    • documentDone

      protected void documentDone(org.apache.uima.cas.CAS cas)
      Description copied from class: AbstractNameFinder
      Called if the current document is completely processed.
      Specified by:
      documentDone in class AbstractNameFinder
    • destroy

      public void destroy()
      Releases allocated resources.
      Specified by:
      destroy in interface org.apache.uima.analysis_component.AnalysisComponent
      Overrides:
      destroy in class org.apache.uima.analysis_component.AnalysisComponent_ImplBase