@PipeBitInfo(name="Dictionary Lookup (Default)", description="Annotates clinically-relevant terms. Terms must match dictionary entries exactly.", dependencies={SENTENCE,BASE_TOKEN}, products=IDENTIFIED_ANNOTATION) public final class DefaultJCasTermAnnotator extends AbstractJCasTermAnnotator
_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 |
---|
DefaultJCasTermAnnotator() |
Modifier and Type | Method and Description |
---|---|
static org.apache.uima.analysis_engine.AnalysisEngineDescription |
createAnnotatorDescription() |
static org.apache.uima.analysis_engine.AnalysisEngineDescription |
createAnnotatorDescription(String descriptorPath) |
void |
findTerms(RareWordDictionary dictionary,
List<FastLookupToken> allTokens,
List<Integer> lookupTokenIndices,
CollectionMap<TextSpan,Long,? extends Collection<Long>> termsFromDictionary)
Given a dictionary, tokens, and lookup token indices, populate a terms collection with discovered terms
|
static boolean |
isTermMatch(RareWordTerm rareWordHit,
List<FastLookupToken> allTokens,
int termStartIndex,
int termEndIndex)
Hopefully the jit will inline this method
|
getAnnotationsInWindow, getDictionaries, initialize, isWindowOk, parseInt, process, processWindow
getRequiredCasInterface, process
getCasInstancesRequired, hasNext, next
batchProcessComplete, collectionProcessComplete, destroy, getContext, getResultSpecification, reconfigure, setResultSpecification
public void findTerms(RareWordDictionary dictionary, List<FastLookupToken> allTokens, List<Integer> lookupTokenIndices, CollectionMap<TextSpan,Long,? extends Collection<Long>> termsFromDictionary)
dictionary
- -allTokens
- -lookupTokenIndices
- -termsFromDictionary
- -public static boolean isTermMatch(RareWordTerm rareWordHit, List<FastLookupToken> allTokens, int termStartIndex, int termEndIndex)
rareWordHit
- rare word term to check for matchallTokens
- all tokens in a windowtermStartIndex
- index of first token in allTokens to checktermEndIndex
- index of last token in allTokens to checkpublic static org.apache.uima.analysis_engine.AnalysisEngineDescription createAnnotatorDescription() throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
public static org.apache.uima.analysis_engine.AnalysisEngineDescription createAnnotatorDescription(String descriptorPath) throws org.apache.uima.resource.ResourceInitializationException
org.apache.uima.resource.ResourceInitializationException
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.