ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject svn commit: r1538760 [1/3] - in /ctakes/trunk: ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/ ctakes-regression-test/testdata/expectedoutput/RegressionPipelineCPETest/ ctakes-regression-test/testdata/input/plaintext/
Date Mon, 04 Nov 2013 20:51:41 GMT
Author: chenpei
Date: Mon Nov  4 20:51:41 2013
New Revision: 1538760

URL: http://svn.apache.org/r1538760
Log:
CTAKES-251 - Infinite recursion in DrugMentionAnnotator.java Thanks Bruce.
Adding the temp patch for the interim while there will be a new drug module(s) coming soon...

Modified:
    ctakes/trunk/ctakes-drug-ner/src/main/java/org/apache/ctakes/drugner/ae/DrugMentionAnnotator.java
    ctakes/trunk/ctakes-regression-test/testdata/expectedoutput/RegressionPipelineCPETest/edge_cases_plaintext_1.txt.xml
    ctakes/trunk/ctakes-regression-test/testdata/input/plaintext/edge_cases_plaintext_1.txt

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=1538760&r1=1538759&r2=1538760&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
Mon Nov  4 20:51:41 2013
@@ -2211,6 +2211,9 @@ public class DrugMentionAnnotator extend
 		{
 			if (noPriorMention) {//Look for lowest value on right side 
 				beginChunk = getAdjustedWindowSpan(jcas,  beginChunk, endSpan, true)[0];
+				if (beginChunk == -1) {
+					beginChunk = drugChangeStatus.getEnd();
+				}
 			}
 			String [] changeStatusArray = new String [] {DrugChangeStatusToken.DECREASE, new Integer
(drugChangeStatus.getBegin()).toString(), new Integer(drugChangeStatus.getEnd()).toString()};
 			generateDrugMentionsAndAnnotations(jcas,



Mime
View raw message