ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1422114 - /incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
Date Fri, 14 Dec 2012 22:01:06 GMT
Author: clin
Date: Fri Dec 14 22:01:04 2012
New Revision: 1422114

URL: http://svn.apache.org/viewvc?rev=1422114&view=rev
Log:
for prediction mode: Add null check before sign DocTimeRel value for a given eventMention

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

Modified: incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
URL: http://svn.apache.org/viewvc/incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java?rev=1422114&r1=1422113&r2=1422114&view=diff
==============================================================================
--- incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
(original)
+++ incubator/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/DocTimeRelAnnotator.java
Fri Dec 14 22:01:04 2012
@@ -94,8 +94,10 @@ public class DocTimeRelAnnotator extends
         String outcome = eventMention.getEvent().getProperties().getDocTimeRel();
         this.dataWriter.write(new Instance<String>(outcome, features));
       } else {
-        String outcome = this.classifier.classify(features);
-        eventMention.getEvent().getProperties().setDocTimeRel(outcome);
+    	if (eventMention.getEvent() != null){
+    		String outcome = this.classifier.classify(features);
+    		eventMention.getEvent().getProperties().setDocTimeRel(outcome);
+    	}
       }
     }
   }



Mime
View raw message