ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1584073 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/EventDurationDistribution.java
Date Wed, 02 Apr 2014 15:51:26 GMT
Author: dligach
Date: Wed Apr  2 15:51:25 2014
New Revision: 1584073

URL: http://svn.apache.org/r1584073
Log:
added a few more negation key words

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/EventDurationDistribution.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/EventDurationDistribution.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/EventDurationDistribution.java?rev=1584073&r1=1584072&r2=1584073&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/EventDurationDistribution.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/duration/EventDurationDistribution.java
Wed Apr  2 15:51:25 2014
@@ -173,7 +173,9 @@ public class EventDurationDistribution {
         } catch (IOException e) {
           System.out.println("Could not open output file: " + outputFile);
         } 
-      } 
+      } else {
+        System.out.println("No duration data for: " + mentionText);
+      }
     }
     
     /**
@@ -183,7 +185,9 @@ public class EventDurationDistribution {
     private static boolean isNegated(JCas jCas, EventMention mention) {
       
       for(BaseToken token : JCasUtil.selectPreceding(jCas, BaseToken.class, mention, 3))
{
-        if(token.getCoveredText().equals("no")) {
+        if(token.getCoveredText().equals("no") || 
+           token.getCoveredText().equals("not") || 
+           token.getCoveredText().equals("off")) {
           return true;
         }
       }



Mime
View raw message