ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1467345 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
Date Fri, 12 Apr 2013 16:46:28 GMT
Author: clin
Date: Fri Apr 12 16:46:28 2013
New Revision: 1467345

URL: http://svn.apache.org/r1467345
Log:
add DateAnnotaor feature extractor for DocTimeRel

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

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java?rev=1467345&r1=1467344&r2=1467345&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
Fri Apr 12 16:46:28 2013
@@ -22,6 +22,7 @@ import java.io.File;
 import java.util.List;
 
 import org.apache.ctakes.temporal.ae.feature.ClosestVerbExtractor;
+import org.apache.ctakes.temporal.ae.feature.DateXExtractor;
 import org.apache.ctakes.temporal.ae.feature.EvevtPropertyExtractor;
 import org.apache.ctakes.temporal.ae.feature.NearbyVerbTenseXExtractor;
 import org.apache.ctakes.temporal.ae.feature.SectionHeaderExtractor;
@@ -81,6 +82,7 @@ public class DocTimeRelAnnotator extends
   private ClosestVerbExtractor closestVerbExtractor;
   private TimeXExtractor timeXExtractor;
   private EvevtPropertyExtractor genericExtractor;
+  private DateXExtractor dateExtractor;
 
   @Override
   public void initialize(UimaContext context) throws ResourceInitializationException {
@@ -99,6 +101,7 @@ public class DocTimeRelAnnotator extends
     this.closestVerbExtractor = new ClosestVerbExtractor();
     this.timeXExtractor = new TimeXExtractor();
     this.genericExtractor = new EvevtPropertyExtractor();
+    this.dateExtractor = new DateXExtractor();
   }
 
   @Override
@@ -111,6 +114,7 @@ public class DocTimeRelAnnotator extends
         features.addAll(this.closestVerbExtractor.extract(jCas, eventMention)); //add closest
verb
         features.addAll(this.timeXExtractor.extract(jCas, eventMention)); //add the closest
time expression types
         features.addAll(this.genericExtractor.extract(jCas, eventMention)); //add the closest
time expression types
+        features.addAll(this.dateExtractor.extract(jCas, eventMention)); //add the closest
NE type
         if (this.isTraining()) {
           String outcome = eventMention.getEvent().getProperties().getDocTimeRel();
           this.dataWriter.write(new Instance<String>(outcome, features));



Mime
View raw message