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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voiddocumentDone(org.apache.uima.cas.CAS cas) Called if the current document is completely processed.protected abstract Span[]protected voidfinal voidinitialize(org.apache.uima.UimaContext context) protected abstract voidpostProcessAnnotations(Span[] detectedNames, org.apache.uima.cas.text.AnnotationFS[] nameAnnotations) final voidprocess(org.apache.uima.cas.CAS cas) Performs name finding on the givenCASobject.voidtypeSystemInit(org.apache.uima.cas.TypeSystem typeSystem) Initializes theTypeSystem.Methods inherited from class org.apache.uima.analysis_component.CasAnnotator_ImplBase
getRequiredCasInterface, processMethods inherited from class org.apache.uima.analysis_component.Annotator_ImplBase
getCasInstancesRequired, hasNext, nextMethods inherited from class org.apache.uima.analysis_component.AnalysisComponent_ImplBase
batchProcessComplete, collectionProcessComplete, destroy, getContext, getLogger, getResultSpecification, reconfigure, setResultSpecification
-
Field Details
-
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
-
context
protected org.apache.uima.UimaContext context -
mLogger
protected org.apache.uima.util.Logger mLogger -
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:
initializein interfaceorg.apache.uima.analysis_component.AnalysisComponent- Overrides:
initializein classorg.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 theTypeSystem.- Overrides:
typeSystemInitin classorg.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
-
process
public final void process(org.apache.uima.cas.CAS cas) Performs name finding on the givenCASobject.- Specified by:
processin classorg.apache.uima.analysis_component.CasAnnotator_ImplBase
-