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
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 Summary
FieldsModifier and TypeFieldDescriptionprivate Meanprivate org.apache.uima.cas.Featureprivate org.apache.uima.cas.Featureprivate org.apache.uima.cas.Typeprivate NameFinderMEstatic final Stringstatic final Stringprivate org.apache.uima.cas.Featurestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class AbstractNameFinder
context, mLogger, mNameType, mNameTypeMapping, mSentenceType, mTokenType, name -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Releases allocated resources.protected voiddocumentDone(org.apache.uima.cas.CAS cas) Called if the current document is completely processed.protected Span[]voidInitializes the current instance with the given context.protected voidpostProcessAnnotations(Span[] detectedNames, org.apache.uima.cas.text.AnnotationFS[] nameAnnotations) voidtypeSystemInit(org.apache.uima.cas.TypeSystem typeSystem) Initializes thetype system.Methods inherited from class AbstractNameFinder
initialize, processMethods 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, getContext, getLogger, getResultSpecification, reconfigure, setResultSpecification
-
Field Details
-
NAME_TYPE_PARAMETER
- See Also:
-
NAME_TYPE_MAP_PARAMETER
- See Also:
-
TOKEN_PATTERN_OPTIMIZATION
- See Also:
-
TOKEN_FEATURE_PARAMETER
- See Also:
-
TOKEN_FEATURE_PREV_WINDOW_SIZE_PARAMETER
- See Also:
-
TOKEN_FEATURE_NEXT_WINDOW_SIZE_PARAMETER
- See Also:
-
TOKEN_CLASS_FEATURE_PARAMETER
- See Also:
-
TOKEN_CLASS_FEATURE_PREV_WINDOW_SIZE_PARAMETER
- See Also:
-
TOKEN_CLASS_FEATURE_NEXT_WINDOW_SIZE_PARAMETER
- See Also:
-
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
-
-
Constructor Details
-
NameFinder
public NameFinder()Initializes a new instance.Note: Use
AbstractNameFinder.initialize(UimaContext)to initialize this instance. Not use the constructor.
-
-
Method Details
-
initialize
public void initialize() throws org.apache.uima.resource.ResourceInitializationExceptionInitializes the current instance with the given context.Note: Do all initialization in this method, do not use the constructor.
- Overrides:
initializein classAbstractNameFinder- Throws:
org.apache.uima.resource.ResourceInitializationException
-
typeSystemInit
public void typeSystemInit(org.apache.uima.cas.TypeSystem typeSystem) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException Initializes thetype system.- Overrides:
typeSystemInitin classAbstractNameFinder- Throws:
org.apache.uima.analysis_engine.AnalysisEngineProcessException
-
find
- Specified by:
findin classAbstractNameFinder
-
postProcessAnnotations
protected void postProcessAnnotations(Span[] detectedNames, org.apache.uima.cas.text.AnnotationFS[] nameAnnotations) - Specified by:
postProcessAnnotationsin classAbstractNameFinder
-
documentDone
protected void documentDone(org.apache.uima.cas.CAS cas) Description copied from class:AbstractNameFinderCalled if the current document is completely processed.- Specified by:
documentDonein classAbstractNameFinder
-
destroy
public void destroy()Releases allocated resources.- Specified by:
destroyin interfaceorg.apache.uima.analysis_component.AnalysisComponent- Overrides:
destroyin classorg.apache.uima.analysis_component.AnalysisComponent_ImplBase
-