ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1753406 - /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java
Date Tue, 19 Jul 2016 17:11:01 GMT
Author: clin
Date: Tue Jul 19 17:11:01 2016
New Revision: 1753406

URL: http://svn.apache.org/viewvc?rev=1753406&view=rev
Log:
add syntactic embedding features for classic event-event model

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

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java?rev=1753406&r1=1753405&r2=1753406&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/EventEventRelationAnnotator.java
Tue Jul 19 17:11:01 2016
@@ -45,6 +45,8 @@ import org.apache.ctakes.temporal.ae.fea
 import org.apache.ctakes.temporal.ae.feature.TokenPropertyFeaturesExtractor;
 import org.apache.ctakes.temporal.ae.feature.DeterminerRelationFeaturesExtractor;
 import org.apache.ctakes.temporal.ae.feature.RelationEmbeddingFeatureExtractor;
+import org.apache.ctakes.temporal.ae.feature.RelationSyntacticETEmbeddingFeatureExtractor;
+import org.apache.ctakes.temporal.ae.feature.RelationSyntacticEmbeddingFeatureExtractor;
 import org.apache.ctakes.temporal.ae.feature.EventArgumentPropertyExtractor;
 import org.apache.ctakes.temporal.ae.feature.EventTimeRelationFeatureExtractor;
 import org.apache.ctakes.temporal.ae.feature.EventPositionRelationFeaturesExtractor;
@@ -128,13 +130,13 @@ public class EventEventRelationAnnotator
 				new File(modelDirectory, "model.jar"));
 	}
 	
-	private RelationEmbeddingFeatureExtractor embedingExtractor;
+	private RelationSyntacticETEmbeddingFeatureExtractor embedingExtractor;
 
 	@Override
 	protected List<RelationFeaturesExtractor<IdentifiedAnnotation,IdentifiedAnnotation>>
getFeatureExtractors() {
-		final String vectorFile = "org/apache/ctakes/temporal/mimic_vectors.txt";
+		final String vectorFile = "org/apache/ctakes/temporal/gloveresult_3";
 		try {
-			this.embedingExtractor = new RelationEmbeddingFeatureExtractor(vectorFile);
+			this.embedingExtractor = new RelationSyntacticETEmbeddingFeatureExtractor(vectorFile);
 		} catch (CleartkExtractorException e) {
 			System.err.println("cannot find file: "+ vectorFile);
 			e.printStackTrace();
@@ -142,7 +144,7 @@ public class EventEventRelationAnnotator
 		return Lists.newArrayList(
 				new UnexpandedTokenFeaturesExtractor() //new TokenFeaturesExtractor()		
 //				, new EmptyFeaturesExtractor()
-				, embedingExtractor
+				,embedingExtractor
 				, new PartOfSpeechFeaturesExtractor()
 				, new EventArgumentPropertyExtractor()
 				, new UmlsFeatureExtractor()



Mime
View raw message