Uploaded image for project: 'cTAKES'
  1. cTAKES
  2. CTAKES-528

annotation confidence is always 0

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 4.0.0
    • None
    • ctakes-type-system
    • None

    Description

      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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            ouyeyu ouyeyu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: