ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1536906 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/TemporalAttributeFeatureExtractor.java
Date Tue, 29 Oct 2013 22:01:55 GMT
Author: clin
Date: Tue Oct 29 22:01:55 2013
New Revision: 1536906

URL: http://svn.apache.org/r1536906
Log:
to accommodate the changes made for TimeXExtractor, now nearby timex could be TimeMention,
DateAnnotation and TimeAnnotation

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

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/TemporalAttributeFeatureExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/TemporalAttributeFeatureExtractor.java?rev=1536906&r1=1536905&r2=1536906&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/TemporalAttributeFeatureExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/TemporalAttributeFeatureExtractor.java
Tue Oct 29 22:01:55 2013
@@ -19,7 +19,7 @@ public class TemporalAttributeFeatureExt
 			IdentifiedAnnotation arg2) throws AnalysisEngineProcessException {
 		ArrayList<Feature> feats = new ArrayList<Feature>();
 		EventMention event = null;
-		TimeMention time = null;
+		IdentifiedAnnotation time = null;
 
 		// swap the order if necessary:
 		if(arg2.getBegin() <= arg1.getBegin() && arg2.getEnd() <= arg1.getEnd()){
@@ -30,13 +30,13 @@ public class TemporalAttributeFeatureExt
 
 		if(arg1 instanceof EventMention){
 			event = (EventMention) arg1;
-			time = (TimeMention) arg2;
+			time = arg2;
 			feats.add(new Feature("Arg1-Event-Modality", event.getEvent().getProperties().getContextualModality()));
-			feats.add(new Feature("Arg2-Time-Class-" + time.getTimeClass()));
+			feats.add(new Feature("Arg2-Time-Class-" + time.getClass()));
 		}else{
-			time = (TimeMention) arg1;
+			time = arg1;
 			event = (EventMention) arg2;
-			feats.add(new Feature("Arg1-Timex-", time.getTimeClass()));
+			feats.add(new Feature("Arg1-Timex-", time.getClass()));
 			feats.add(new Feature("Arg2-Event-", event.getEvent().getProperties().getContextualModality()));
 		}
 		



Mime
View raw message