You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by sp...@apache.org on 2013/01/28 19:06:57 UTC

svn commit: r1439541 - /incubator/ctakes/branches/ctakes-3.0.0-incubating/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java

Author: spmurphy50
Date: Mon Jan 28 18:06:57 2013
New Revision: 1439541

URL: http://svn.apache.org/viewvc?rev=1439541&view=rev
Log:
Add fix CTAKE-129 Populate the Drug NER named entity confidence attribute 

Modified:
    incubator/ctakes/branches/ctakes-3.0.0-incubating/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java

Modified: incubator/ctakes/branches/ctakes-3.0.0-incubating/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/branches/ctakes-3.0.0-incubating/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java?rev=1439541&r1=1439540&r2=1439541&view=diff
==============================================================================
--- incubator/ctakes/branches/ctakes-3.0.0-incubating/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java (original)
+++ incubator/ctakes/branches/ctakes-3.0.0-incubating/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java Mon Jan 28 18:06:57 2013
@@ -387,7 +387,11 @@ public class DrugMentionAnnotator extend
 			// if (d!=null) d.addToIndexes(); // don't need to be able to get these directly from the AnnotationIndex
 			if (d!=null) medicationMention.setStartDate(d);
 		}
-
+		// Add fix CTAKE-129 Populate the Drug NER named entity confidence attribute 
+		if (fromAnnotation.getConfidence() != 0.0 ) {
+			medicationMention.setConfidence(fromAnnotation.getConfidence());
+		}
+			
 		// There currently is no endDate in DrugMentionAnnotation 
 		//if (fromAnnotation.getEndDate()!=null) {
 		//	
@@ -730,7 +734,7 @@ public class DrugMentionAnnotator extend
         Iterator chkNE = namedE.iterator();
         Iterator newNE = wordTokenList.iterator();
         boolean neFound = false;
-        MedicationEventMention ne = null;
+ //       MedicationEventMention ne = null;
         WordToken we = null;
         Object mt = (Object)  measurementTokenItr.next();
         if (mt instanceof  StrengthUnitToken) {