ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1471007 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java
Date Tue, 23 Apr 2013 15:23:13 GMT
Author: clin
Date: Tue Apr 23 15:23:12 2013
New Revision: 1471007

URL: http://svn.apache.org/r1471007
Log:
rename the event property extractor. add a null check for feature extraction

Added:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java
      - copied, changed from r1468614, ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EvevtPropertyExtractor.java

Copied: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java
(from r1468614, ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EvevtPropertyExtractor.java)
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java?p2=ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java&p1=ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EvevtPropertyExtractor.java&r1=1468614&r2=1471007&rev=1471007&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EvevtPropertyExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/EventPropertyExtractor.java
Tue Apr 23 15:23:12 2013
@@ -29,13 +29,13 @@ import org.cleartk.classifier.Feature;
 import org.cleartk.classifier.feature.extractor.CleartkExtractorException;
 import org.cleartk.classifier.feature.extractor.simple.SimpleFeatureExtractor;
 
-public class EvevtPropertyExtractor implements SimpleFeatureExtractor {
+public class EventPropertyExtractor implements SimpleFeatureExtractor {
 
   private String name;
 
 //  private Logger logger = Logger.getLogger(this.getClass().getName());
 
-  public EvevtPropertyExtractor() {
+  public EventPropertyExtractor() {
     super();
     this.name = "EventContextualModality";
     
@@ -48,11 +48,12 @@ public class EvevtPropertyExtractor impl
 	  //1 get event:
 	  EventMention event = (EventMention)annotation;
 	  String contextModal = event.getEvent().getProperties().getContextualModality();
-	  if (contextModal.equals("GENERIC")){
+	  if (contextModal != null && contextModal.equals("GENERIC")){
 		  Feature contexmod = new Feature(this.name, contextModal);
 		  features.add(contexmod);
 //		  logger.info("found a event: "+ contextModal);
 	  }
+	  
 	  return features;
   }
 



Mime
View raw message