ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brittfi...@apache.org
Subject svn commit: r1582436 - /ctakes/trunk/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java
Date Thu, 27 Mar 2014 18:30:23 GMT
Author: brittfitch
Date: Thu Mar 27 18:30:22 2014
New Revision: 1582436

URL: http://svn.apache.org/r1582436
Log:
fix for infinite loop (follow on to ctakes-251)
code was expanding a span and trying to get the min start and erroneously setting start to
-1 if one of the potential starts was uninitialized.

Modified:
    ctakes/trunk/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java

Modified: ctakes/trunk/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java?rev=1582436&r1=1582435&r2=1582436&view=diff
==============================================================================
--- ctakes/trunk/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java
(original)
+++ ctakes/trunk/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java
Thu Mar 27 18:30:22 2014
@@ -2874,7 +2874,7 @@ private int[] getNarrativeSpansContainin
 			return senSpan;
 		if (highestRange  && spanStrength[0]!=-1) {
 			senSpan = spanStrength[0] > spanFrequency[0]? spanStrength : spanFrequency; 
-		} else if (spanFrequency[0]!=-1) {
+		} else if (spanFrequency[0]!=-1 && spanStrength[0]!=-1) {
 			senSpan = spanStrength[0] < spanFrequency[0]? spanStrength : spanFrequency; 
 		}
 		return spanDose[0] > senSpan[0]? spanDose : senSpan;



Mime
View raw message