You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ctakes.apache.org by "ouyeyu (JIRA)" <ji...@apache.org> on 2018/12/06 00:07:00 UTC
[jira] [Created] (CTAKES-528) annotation confidence is always 0
ouyeyu created CTAKES-528:
-----------------------------
Summary: annotation confidence is always 0
Key: CTAKES-528
URL: https://issues.apache.org/jira/browse/CTAKES-528
Project: cTAKES
Issue Type: Wish
Components: ctakes-type-system
Affects Versions: 4.0.0
Reporter: ouyeyu
I noticed that annotation.getConfidence() and umlsConcept.getScore() both always return 0.
To figure out why this happens,
First, I found in ctakes/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/NamedEntityLookupConsumerImpl.java, the consumeHits function creates
IdentifiedAnnotation neAnnot = new IdentifiedAnnotation(jcas);
No confidence and score are added into neAnnot.
Then I go to
apache-ctakes-4.0.0-src/ctakes-type-system/target/generated-sources/jcasgen/org/apache/ctakes/typesystem/type/textsem/IdentifiedAnnotation.java
public float getConfidence() {
if (IdentifiedAnnotation_Type.featOkTst && ((IdentifiedAnnotation_Type)jcasType).casFeat_confidence == null)
jcasType.jcas.throwFeatMissing("confidence", "org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation");
return jcasType.ll_cas.ll_getFloatValue(addr, ((IdentifiedAnnotation_Type)jcasType).casFeatCode_confidence);}
I further goes to the UIMA repo.
/uimaj/uimaj-core/src/main/java/org/apache/uima/cas/impl/CASImpl.java
/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/cas/impl/CASImpl.java
@Override
public final float ll_getFloatValue(int fsRef, int featureCode) {
return int2float(ll_getIntValue(fsRef, featureCode));
}
@Override
public final int ll_getIntValue(int fsRef, int featureCode) {
return this.getHeap().heap[(fsRef + this.svd.casMetadata.featureOffset[featureCode])];
}
Does this mean in the heap, confidence and score are hardcoded as 0? And how is the heap created?
Is this always returning 0 a feature or a bug?
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)