ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1636658 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
Date Tue, 04 Nov 2014 17:28:33 GMT
Author: clin
Date: Tue Nov  4 17:28:32 2014
New Revision: 1636658

URL: http://svn.apache.org/r1636658
Log:
Check if an event has related event properties.

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=1636658&r1=1636657&r2=1636658&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
Tue Nov  4 17:28:32 2014
@@ -153,8 +153,10 @@ public class DocTimeRelAnnotator extends
       //        features.addAll(this.durationExtractor.extract(jCas, eventMention)); //add
duration feature
       //        features.addAll(this.disSemExtractor.extract(jCas, eventMention)); //add
distributional semantic features
       if (this.isTraining()) {
-        String outcome = eventMention.getEvent().getProperties().getDocTimeRel();
-        this.dataWriter.write(new Instance<String>(outcome, features));
+    	  if(eventMention.getEvent() != null){
+    		  String outcome = eventMention.getEvent().getProperties().getDocTimeRel();
+    		  this.dataWriter.write(new Instance<String>(outcome, features));
+    	  }
       } else {
         String outcome = this.classifier.classify(features);
         if (eventMention.getEvent() == null) {



Mime
View raw message