ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1763303 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventEventRelPrinter.java
Date Tue, 04 Oct 2016 17:00:53 GMT
Author: dligach
Date: Tue Oct  4 17:00:53 2016
New Revision: 1763303

URL: http://svn.apache.org/viewvc?rev=1763303&view=rev
Log:
simplified label assignment

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

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventEventRelPrinter.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventEventRelPrinter.java?rev=1763303&r1=1763302&r2=1763303&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventEventRelPrinter.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventEventRelPrinter.java
Tue Oct  4 17:00:53 2016
@@ -164,22 +164,16 @@ public class EventEventRelPrinter {
             BinaryTextRelation forwardRelation = relationLookup.get(Arrays.asList(mention1,
mention2));
             BinaryTextRelation reverseRelation = relationLookup.get(Arrays.asList(mention2,
mention1));
 
-            String label;            
+            String label = "none";            
             if(forwardRelation != null) {
               if(forwardRelation.getCategory().equals("CONTAINS")) {
                 label = "contains";   // this is contains relation
-              } else {
-                label = "none";       // this is some other relation
               }
             } else if(reverseRelation != null) {
               if(reverseRelation.getCategory().equals("CONTAINS")) {
                 label = "contains-1"; // this is contains relation
-              } else {
-                label = "none";       // this is some other relation
               }
-            } else {
-              label = "none";         // no relation between mentions
-            }
+            } 
 
             String context = getTokensBetween(systemView, sentence, mention1, "e1", mention2,
"e2", 2);
             String text = String.format("%s|%s", label, context);



Mime
View raw message