public abstract class AbstractJCasTermAnnotator extends org.apache.uima.fit.component.JCasAnnotator_ImplBase implements JCasTermAnnotator, WindowProcessor
Modifier and Type | Field and Description |
---|---|
protected int |
_minimumLookupSpan |
DEFAULT_DICT_DESC_PATH, DEFAULT_EXCLUSION_TAGS, DEFAULT_LOOKUP_WINDOW, DEFAULT_MINIMUM_SPAN, DICTIONARY_DESCRIPTOR_KEY, PARAM_EXC_TAGS_KEY, PARAM_MIN_SPAN_KEY, PARAM_WINDOW_ANNOT_KEY
Constructor and Description |
---|
AbstractJCasTermAnnotator() |
Modifier and Type | Method and Description |
---|---|
protected void |
getAnnotationsInWindow(org.apache.uima.jcas.JCas jcas,
org.apache.uima.cas.text.AnnotationFS window,
List<FastLookupToken> allTokens,
Collection<Integer> lookupTokenIndices)
For the given lookup window fills two collections with 1) All tokens in the window,
and 2) indexes of tokens in the window to be used for lookup
|
Collection<RareWordDictionary> |
getDictionaries() |
void |
initialize(org.apache.uima.UimaContext uimaContext) |
boolean |
isWindowOk(org.apache.uima.jcas.tcas.Annotation window)
Skip windows that are section headers/footers.
|
protected static int |
parseInt(Object value,
String name,
int defaultValue) |
void |
process(org.apache.uima.jcas.JCas jcas) |
void |
processWindow(org.apache.uima.jcas.JCas jcas,
org.apache.uima.jcas.tcas.Annotation window,
Map<RareWordDictionary,CollectionMap<TextSpan,Long,? extends Collection<Long>>> dictionaryTerms)
Processes a window of annotations for dictionary terms
|
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
batchProcessComplete, collectionProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecification
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
findTerms
public void initialize(org.apache.uima.UimaContext uimaContext) throws org.apache.uima.resource.ResourceInitializationException
initialize
in interface org.apache.uima.analysis_component.AnalysisComponent
initialize
in class org.apache.uima.fit.component.JCasAnnotator_ImplBase
org.apache.uima.resource.ResourceInitializationException
public void process(org.apache.uima.jcas.JCas jcas) throws org.apache.uima.analysis_engine.AnalysisEngineProcessException
process
in class org.apache.uima.analysis_component.JCasAnnotator_ImplBase
org.apache.uima.analysis_engine.AnalysisEngineProcessException
public Collection<RareWordDictionary> getDictionaries()
getDictionaries
in interface JCasTermAnnotator
public boolean isWindowOk(org.apache.uima.jcas.tcas.Annotation window)
isWindowOk
in interface WindowProcessor
window
- annotation in which to search for termspublic void processWindow(org.apache.uima.jcas.JCas jcas, org.apache.uima.jcas.tcas.Annotation window, Map<RareWordDictionary,CollectionMap<TextSpan,Long,? extends Collection<Long>>> dictionaryTerms)
processWindow
in interface WindowProcessor
jcas
- -window
- annotation in which to search for termsdictionaryTerms
- map of entity types and terms for those types in the windowprotected void getAnnotationsInWindow(org.apache.uima.jcas.JCas jcas, org.apache.uima.cas.text.AnnotationFS window, List<FastLookupToken> allTokens, Collection<Integer> lookupTokenIndices)
jcas
- -window
- annotation lookup windowallTokens
- filled with all tokens, including punctuation, etc.lookupTokenIndices
- filled with indices of tokens to use for lookupCopyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.