ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1784193 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java
Date Thu, 23 Feb 2017 18:48:27 GMT
Author: clin
Date: Thu Feb 23 18:48:27 2017
New Revision: 1784193

URL: http://svn.apache.org/viewvc?rev=1784193&view=rev
Log:
For EventPropertyExtractor use a different way to get Doc ID.

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java?rev=1784193&r1=1784192&r2=1784193&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java
Thu Feb 23 18:48:27 2017
@@ -25,6 +25,7 @@ import java.util.List;
 //import java.util.logging.Logger;
 import java.util.Set;
 
+import org.apache.ctakes.core.util.DocumentIDAnnotationUtil;
 import org.apache.ctakes.typesystem.type.syntax.BaseToken;
 import org.apache.ctakes.typesystem.type.syntax.NewlineToken;
 import org.apache.ctakes.typesystem.type.syntax.PunctuationToken;
@@ -86,7 +87,7 @@ public class EventPropertyExtractor impl
 		//get Document ID:
 		String fname;
 		try {
-			String docID = ViewUriUtil.getURI(view).toString();
+			String docID = DocumentIDAnnotationUtil.getDocumentID(view);//ViewUriUtil.getURI(view).toString();
 			
 			int begin = docID.lastIndexOf("_");
 			fname = docID.substring(begin+1);
@@ -98,10 +99,10 @@ public class EventPropertyExtractor impl
 				features.add(new Feature("docName:others"));
 			}
 			
-		} catch (AnalysisEngineProcessException e) {
-			e.printStackTrace();
-			fname = "AnalysisEngineProcessException.UnableToGetDocIdFromUriView";
-			features.add(new Feature("docName", fname));
+//		} catch (AnalysisEngineProcessException e) {
+//			e.printStackTrace();
+//			fname = "AnalysisEngineProcessException.UnableToGetDocIdFromUriView";
+//			features.add(new Feature("docName", fname));
 			
 		} catch (org.apache.uima.cas.CASRuntimeException e) { // for unit tests that don't set
up the UriView 
 			e.printStackTrace();



Mime
View raw message