ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1779992 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/ArgContextProvider.java
Date Mon, 23 Jan 2017 21:33:56 GMT
Author: clin
Date: Mon Jan 23 21:33:56 2017
New Revision: 1779992

URL: http://svn.apache.org/viewvc?rev=1779992&view=rev
Log:
For event-time and event-event relations, add timeClass to the BIO sequence representation.

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

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/ArgContextProvider.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/ArgContextProvider.java?rev=1779992&r1=1779991&r2=1779992&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/ArgContextProvider.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/nn/data/ArgContextProvider.java
Mon Jan 23 21:33:56 2017
@@ -14,9 +14,9 @@ import org.apache.uima.jcas.tcas.Annotat
 public class ArgContextProvider {
 
 	private static TimeMention coveringTimex;
-	private static final String BTAG = "<B>";
+	private static final String BTAG = "<B";
 	private static final String OTAG = "<O>";
-	private static final String ITAG = "<I>";
+	private static final String ITAG = "<I";
 
 	/**
 	 * Position features for event-time relations
@@ -318,7 +318,7 @@ public class ArgContextProvider {
 		List<BaseToken> tokens = JCasUtil.selectCovered(jCas, BaseToken.class, timex);
 		int numTokens = tokens.size();
 		if(numTokens>0){
-			timeTag=BTAG;
+			timeTag=BTAG+"_"+timex.getTimeClass()+">";
 		}else{
 			return "";
 		}
@@ -327,7 +327,7 @@ public class ArgContextProvider {
 			return timeTag;
 		}
 		for(int i=0;i<numTokens-1; i++){
-			timeTag= timeTag+ " " + ITAG;
+			timeTag= timeTag+ " " + ITAG+"_"+timex.getTimeClass()+">";
 		}
 		return timeTag;
 	}



Mime
View raw message