ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1513881 - in /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae: EventTimeRelationAnnotator.java feature/treekernel/TemporalPETExtractor.java
Date Wed, 14 Aug 2013 13:45:10 GMT
Author: clin
Date: Wed Aug 14 13:45:09 2013
New Revision: 1513881

URL: http://svn.apache.org/r1513881
Log:
Generalizing terminal symbols for PET trees. 

Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventTimeRelationAnnotator.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/treekernel/TemporalPETExtractor.java

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventTimeRelationAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventTimeRelationAnnotator.java?rev=1513881&r1=1513880&r2=1513881&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventTimeRelationAnnotator.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventTimeRelationAnnotator.java
Wed Aug 14 13:45:09 2013
@@ -9,7 +9,7 @@ import org.apache.ctakes.relationextract
 import org.apache.ctakes.relationextractor.ae.features.PartOfSpeechFeaturesExtractor;
 import org.apache.ctakes.relationextractor.ae.features.RelationFeaturesExtractor;
 import org.apache.ctakes.relationextractor.ae.features.TokenFeaturesExtractor;
-import org.apache.ctakes.temporal.ae.feature.TemporalAttributeFeatureExtractor;
+//import org.apache.ctakes.temporal.ae.feature.TemporalAttributeFeatureExtractor;
 import org.apache.ctakes.temporal.ae.feature.treekernel.EventTimeFlatTreeFeatureExtractor;
 import org.apache.ctakes.temporal.ae.feature.treekernel.TemporalPETExtractor;
 import org.apache.ctakes.temporal.ae.feature.treekernel.TemporalPathExtractor;
@@ -66,7 +66,7 @@ public class EventTimeRelationAnnotator 
     return Lists.newArrayList(
     						  new TokenFeaturesExtractor()
     						, new PartOfSpeechFeaturesExtractor()
-    						, new TemporalAttributeFeatureExtractor()
+//    						, new TemporalAttributeFeatureExtractor()
     						, new EventTimeFlatTreeFeatureExtractor()
     						, new TemporalPETExtractor()
     						, new TemporalPathExtractor()

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/treekernel/TemporalPETExtractor.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/treekernel/TemporalPETExtractor.java?rev=1513881&r1=1513880&r2=1513881&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/treekernel/TemporalPETExtractor.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/feature/treekernel/TemporalPETExtractor.java
Wed Aug 14 13:45:09 2013
@@ -69,16 +69,20 @@ public class TemporalPETExtractor implem
 		if(t1.getBegin() <= t2.getBegin() && t1.getEnd() >= t2.getEnd()){
 			// t1 encloses t2
 			tree = TreeExtractor.getSimpleClone(t1);
+			tree.setGernalizeLeaf(true);
 		}else if(t2.getBegin() <= t1.getBegin() && t2.getEnd() >= t1.getEnd()){
 			// t2 encloses t1
 			tree = TreeExtractor.getSimpleClone(t2);
+			tree.setGernalizeLeaf(true);
 		}else{
 			tree = TreeExtractor.extractPathEnclosedTree(t1, t2, jcas);
+			tree.setGernalizeLeaf(true);
 		}
 
 		moveTimexDownToNP(tree);
 		
 		features.add(new TreeFeature("TK_PET", tree.toString()));
+		tree.setGernalizeLeaf(false);
 		return features;
 	}
 



Mime
View raw message