ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1493888 - in /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal: ae/EventTimeRelationAnnotator.java eval/EvaluationOfEventTimeRelations.java
Date Mon, 17 Jun 2013 19:07:18 GMT
Author: tmill
Date: Mon Jun 17 19:07:18 2013
New Revision: 1493888

URL: http://svn.apache.org/r1493888
Log:
Checked in the configuration and output parameters to (almost) replicate bionlp 2012 results.

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/eval/EvaluationOfEventTimeRelations.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=1493888&r1=1493887&r2=1493888&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
Mon Jun 17 19:07:18 2013
@@ -10,6 +10,10 @@ import org.apache.ctakes.relationextract
 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.treekernel.EventTimeFlatTreeFeatureExtractor;
+import org.apache.ctakes.temporal.ae.feature.treekernel.TemporalFTExtractor;
+import org.apache.ctakes.temporal.ae.feature.treekernel.TemporalPETExtractor;
+import org.apache.ctakes.temporal.ae.feature.treekernel.TemporalPathExtractor;
 import org.apache.ctakes.typesystem.type.relation.BinaryTextRelation;
 import org.apache.ctakes.typesystem.type.textsem.EventMention;
 import org.apache.ctakes.typesystem.type.textsem.IdentifiedAnnotation;
@@ -63,10 +67,10 @@ public class EventTimeRelationAnnotator 
     return Lists.newArrayList(
     						  new TokenFeaturesExtractor()
     						, new PartOfSpeechFeaturesExtractor()
-    						, new TemporalAttributeFeatureExtractor()
-//    						, new EventTimeFlatTreeFeatureExtractor()
-//    						, new TemporalPETExtractor()
-//    						, new TemporalPathExtractor()
+//    						, new TemporalAttributeFeatureExtractor()
+    						, new EventTimeFlatTreeFeatureExtractor()
+    						, new TemporalPETExtractor()
+    						, new TemporalPathExtractor()
 //    						, new TemporalFTExtractor()
     						);
   }

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java?rev=1493888&r1=1493887&r2=1493888&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
Mon Jun 17 19:07:18 2013
@@ -111,7 +111,7 @@ public class EvaluationOfEventTimeRelati
     List<Integer> trainItems = THYMEData.getTrainPatientSets(patientSets);
     List<Integer> devItems = THYMEData.getDevPatientSets(patientSets);
     List<Integer> testItems = THYMEData.getTestPatientSets(patientSets);
-    ParameterSettings params = defaultParams;
+    ParameterSettings params = allParams;
 
     //    List<ParameterSettings> possibleParams = Lists.newArrayList();
     //    Map<ParameterSettings, Double> scoredParams = new HashMap<ParameterSettings,
Double>();
@@ -149,22 +149,12 @@ public class EvaluationOfEventTimeRelati
       }
       params.stats = evaluation.trainAndTest(training, testing);
       //      System.err.println(options.getKernelParams() == null ? params : options.getKernelParams());
-      //      System.err.println(params.stats);
+      System.err.println(params.stats);
       tempModelDir.delete();
     }catch(ResourceInitializationException e){
       System.err.println("Error with parameter settings: " + params);
       e.printStackTrace();
     }
-
-    // print performance of each set of parameters
-    System.err.printf(
-        "F1=%.3f P=%.3f R=%.3f %s\n",
-        params.stats.f1(),
-        params.stats.precision(),
-        params.stats.recall(),
-        options.getKernelParams() == null ? params : options.getKernelParams());
-    System.err.println();
-
   }
 
   private ParameterSettings params;



Mime
View raw message