public final class PrecisionTermConsumer extends AbstractTermConsumer
Modifier and Type | Field and Description |
---|---|
private TermConsumer |
_idHitConsumer |
Constructor and Description |
---|
PrecisionTermConsumer(UimaContext uimaContext,
java.util.Properties properties) |
Modifier and Type | Method and Description |
---|---|
void |
consumeTypeIdHits(JCas jcas,
java.lang.String defaultScheme,
int cTakesSemantic,
CollectionMap<TextSpan,java.lang.Long,? extends java.util.Collection<java.lang.Long>> semanticTerms,
CollectionMap<java.lang.Long,Concept,? extends java.util.Collection<Concept>> conceptMap)
Only uses the largest spans for the type
|
static CollectionMap<TextSpan,java.lang.Long,? extends java.util.Collection<java.lang.Long>> |
createPreciseTerms(CollectionMap<TextSpan,java.lang.Long,? extends java.util.Collection<java.lang.Long>> semanticTerms)
Refine a collection of dictionary terms to only contain the most specific variations:
"colon cancer" instead of "cancer", performed by span inclusion /complete containment, not overlap
|
consumeHits, getCodingScheme, getUsedcTakesSemantics, hascTakesSemantic
private final TermConsumer _idHitConsumer
public PrecisionTermConsumer(UimaContext uimaContext, java.util.Properties properties)
public void consumeTypeIdHits(JCas jcas, java.lang.String defaultScheme, int cTakesSemantic, CollectionMap<TextSpan,java.lang.Long,? extends java.util.Collection<java.lang.Long>> semanticTerms, CollectionMap<java.lang.Long,Concept,? extends java.util.Collection<Concept>> conceptMap) throws AnalysisEngineProcessException
jcas
- -defaultScheme
- - name of the coding scheme to use if no secondary (snomed, rxnorm) schemes existcTakesSemantic
- cTakes IdentifiedAnnotation only accepts an integer as a cTakesSemanticAnalysisEngineProcessException
public static CollectionMap<TextSpan,java.lang.Long,? extends java.util.Collection<java.lang.Long>> createPreciseTerms(CollectionMap<TextSpan,java.lang.Long,? extends java.util.Collection<java.lang.Long>> semanticTerms)
semanticTerms
- terms in the dictionary