ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1758469 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/EventTimeRelPrinter.java
Date Tue, 30 Aug 2016 21:01:32 GMT
Author: dligach
Date: Tue Aug 30 21:01:31 2016
New Revision: 1758469

URL: http://svn.apache.org/viewvc?rev=1758469&view=rev
Log:
now handling the situation where both event-time and time-event relations present

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/EventTimeRelPrinter.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/EventTimeRelPrinter.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/EventTimeRelPrinter.java?rev=1758469&r1=1758468&r2=1758469&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/EventTimeRelPrinter.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/EventTimeRelPrinter.java
Tue Aug 30 21:01:31 2016
@@ -186,32 +186,21 @@ public class EventTimeRelPrinter {
               System.out.println("event-time:" + (eventTimeRelation == null ? "null" : eventTimeRelation.getCategory()));
             }
 
-            String label;
+            String label = "none";
             if(timeEventRelation != null) {
               if(timeEventRelation.getCategory().equals("CONTAINS")) {
                 label = "contains";  // this is contains
               } else {
-                label = "none";      // e.g. before or overlap
+                // label = "none";      // e.g. before or overlap
               }
-            } else if(eventTimeRelation != null) {
+            } 
+            if(eventTimeRelation != null) {
               if(eventTimeRelation.getCategory().equals("CONTAINS")) {
                 label = "contains-1"; // this is contains
               } else {
-                label = "none";       // some other relation type
+                // label = "none";       // some other relation type
               }
-            } else {
-              label = "none";         // no relation between this time and event
-            }
-
-            //            commented version can be used to generate data with all labels
           
-            //            String label;
-            //            if(timeEventRelation != null) {
-            //              label = timeEventRelation.getCategory().toLowerCase();
-            //            } else if(eventTimeRelation != null) {
-            //              label = eventTimeRelation.getCategory().toLowerCase() + "-1";
-            //            } else {
-            //              label = "none";         // no relation between this time and
event
-            //            }
+            } 
 
             String context;
             if(time.getBegin() < event.getBegin()) {



Mime
View raw message