public class PersonTitleAnnotator
extends org.apache.uima.analysis_component.CasAnnotator_ImplBase
CivilianTitles, MilitaryTitles, and
GovernmentTitles configuration parameters.
If the ContainingAnnotationType parameter is specified, this annotator will only
look for titles within existing annotations of that type. This feature can be used, for example,
to only match person titles within existing Person Name annotations, discovered by some annotator
that has run previously.
| Constructor and Description |
|---|
PersonTitleAnnotator() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
annotateRange(org.apache.uima.cas.CAS aCAS,
String aText,
int aBeginPos)
A utility method that searches a part of the document for Person Titles.
|
protected void |
annotateRange(org.apache.uima.cas.CAS aCAS,
String aText,
int aBeginPos,
String aTitleType,
String[] aTitles)
A utility method that searches a part of the document for a specific kind of Person Title.
|
protected void |
createAnnotation(org.apache.uima.cas.CAS aCAS,
int aBeginPos,
int aEndPos,
String aTitleType)
Creates an PersonTitle annotation in the CAS.
|
void |
initialize(org.apache.uima.UimaContext aContext)
Performs initialization logic.
|
void |
process(org.apache.uima.cas.CAS aCAS)
Annotates a document.
|
void |
typeSystemInit(org.apache.uima.cas.TypeSystem aTypeSystem)
Called whenever the CAS type system changes.
|
getRequiredCasInterface, processgetCasInstancesRequired, hasNext, nextpublic void initialize(org.apache.uima.UimaContext aContext)
throws org.apache.uima.resource.ResourceInitializationException
initialize in interface org.apache.uima.analysis_component.AnalysisComponentinitialize in class org.apache.uima.analysis_component.AnalysisComponent_ImplBaseorg.apache.uima.resource.ResourceInitializationExceptionAnalysisComponent_ImplBase.initialize(UimaContext)public void typeSystemInit(org.apache.uima.cas.TypeSystem aTypeSystem)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
typeSystemInit in class org.apache.uima.analysis_component.CasAnnotator_ImplBaseorg.apache.uima.analysis_engine.AnalysisEngineProcessExceptionBaseAnnotator.typeSystemInit(TypeSystem)public void process(org.apache.uima.cas.CAS aCAS)
throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process in class org.apache.uima.analysis_component.CasAnnotator_ImplBaseaCAS - CAS containing document text and previously discovered annotations, and to which new
annotations are to be written.org.apache.uima.analysis_engine.AnalysisEngineProcessExceptionCasAnnotator_ImplBase.process(CAS)protected void annotateRange(org.apache.uima.cas.CAS aCAS,
String aText,
int aBeginPos)
aCAS - the CAS in which to create new annotationsaText - the substring of the document text within which to searchaBeginPos - the position of this substring relative to the start of the documentprotected void annotateRange(org.apache.uima.cas.CAS aCAS,
String aText,
int aBeginPos,
String aTitleType,
String[] aTitles)
aCAS - the CAS in which to create new annotationsaText - the substring of the document text within which to searchaBeginPos - the position of this substring relative to the start of the documentaTitleType - the type of title to look for. This becomes the value of the Kind
feature.aTitles - the exact strings to look for in the documentprotected void createAnnotation(org.apache.uima.cas.CAS aCAS,
int aBeginPos,
int aEndPos,
String aTitleType)
aCAS - the CAS in which to create the annotationaBeginPos - the begin position of the annotation relative to the start of the documentaEndPos - the end position of the annotation relative to the start of the document. (Note that,
as in the Java string functions, the end position is one past the last character in
the annotation, so that (end - begin) = length.aTitleType - the type of person title. This becomes the value of the Kind feature.Copyright © 2006–2018 The Apache Software Foundation. All rights reserved.