ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dlig...@apache.org
Subject svn commit: r1762962 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventTimeRelPositionPrinter.java
Date Fri, 30 Sep 2016 19:56:32 GMT
Author: dligach
Date: Fri Sep 30 19:56:32 2016
New Revision: 1762962

URL: http://svn.apache.org/viewvc?rev=1762962&view=rev
Log:
added an example

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

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventTimeRelPositionPrinter.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventTimeRelPositionPrinter.java?rev=1762962&r1=1762961&r2=1762962&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventTimeRelPositionPrinter.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/EventTimeRelPositionPrinter.java
Fri Sep 30 19:56:32 2016
@@ -55,7 +55,15 @@ import com.lexicalscope.jewel.cli.CliFac
 import com.lexicalscope.jewel.cli.Option;
 
 /**
- * Print gold standard relations and their context.
+ * contains(spring of 2009, drained):
+ * perineal abscess <e> drained </e> in the <t> spring of 2009 </t>
.
+ * 0        1           2            3  4       5      6  7         8
+ *
+ * time arg position: 5, 6, 7
+ * event arg position: 2
+ * 
+ * distance to time: -5, -4, -3, -2, -1, 0, 0, 0, 1
+ * distance to event: -2, -1, 0, 1, 2, 3, 4, 5, 6
  * 
  * @author dmitriy dligach
  */
@@ -350,9 +358,9 @@ public class EventTimeRelPositionPrinter
     }
 
     String tokensAsString = String.join(" ", tokens).replaceAll("[\r\n]", " ");
-    String wrtToTimeAsString = String.join(" ", positionsWrtToTime);
-    String wrtToEventAsString = String.join(" ", positionsWrtToEvent);
+    String distanceToTime = String.join(" ", positionsWrtToTime);
+    String distanceToEvent = String.join(" ", positionsWrtToEvent);
     
-    return tokensAsString + "|" + wrtToTimeAsString + "|" + wrtToEventAsString;
+    return tokensAsString + "|" + distanceToTime + "|" + distanceToEvent;
   } 
 }



Mime
View raw message