Kim Ebert created CTAKES-316:
--------------------------------
Summary: "I do not see any" returns different ContextAnnotations
in drugner pipeline
Key: CTAKES-316
URL: https://issues.apache.org/jira/browse/CTAKES-316
Project: cTAKES
Issue Type: Bug
Components: ctakes-drug-ner
Affects Versions: 3.2.0
Reporter: Kim Ebert
"I do not see any"
Can result in the following ContextAnnotations:
<org.apache.ctakes.typesystem.type.textsem.ContextAnnotation _indexed="1"
_id="130" _ref_sofa="1" begin="13" end="16" id="0" typeID="0"
discoveryTechnique="0" confidence="0.0" polarity="0" uncertainty="0"
conditional="false" generic="false" historyOf="0" FocusText="I" Scope="RIGHT"/>
or
<org.apache.ctakes.typesystem.type.textsem.ContextAnnotation _indexed="1"
_id="130" _ref_sofa="1" begin="5" end="16" id="0" typeID="0"
discoveryTechnique="0" confidence="0.0" polarity="0" uncertainty="0"
conditional="false" generic="false" historyOf="0" FocusText="I" Scope="RIGHT"/>
or
<org.apache.ctakes.typesystem.type.textsem.ContextAnnotation _indexed="1"
_id="130" _ref_sofa="1" begin="5" end="8" id="0" typeID="0"
discoveryTechnique="0" confidence="0.0" polarity="0" uncertainty="0"
conditional="false" generic="false" historyOf="0" FocusText="I" Scope="RIGHT"/>
Well, after doing some digging it turns out that
org.apache.ctakes.necontexts.negation.NegationContextAnalyzer is to blame.
The code looks like the following:
public ContextHit analyzeContext(List<? extends Annotation> contextTokens, int
scopeOrientation)
throws AnalysisEngineProcessException {
List<TextToken> fsmTokenList = wrapAsFsmTokens(contextTokens);
try {
Set<NegationIndicator> s = _negIndicatorFSM.execute(fsmTokenList);
if (s.size() > 0) {
NegationIndicator neg = s.iterator().next();
return new ContextHit(neg.getStartOffset(), neg.getEndOffset());
} else {
return null;
}
} catch (Exception e) {
throw new AnalysisEngineProcessException(e);
}
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)