ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1493821 - in /ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal: ae/baselines/ eval/
Date Mon, 17 Jun 2013 15:41:40 GMT
Author: tmill
Date: Mon Jun 17 15:41:39 2013
New Revision: 1493821

URL: http://svn.apache.org/r1493821
Log:
Refactored temp relations to have separate eval for event-time and event-event that both depend
on subclass which encapsulates common functionality.

Added:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/RecallBaselineEventEventRelationAnnotator.java
  (with props)
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/TreeHeightBaseline.java
  (with props)
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
  (contents, props changed)
      - copied, changed from r1493804, ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java
Removed:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java
Modified:
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java
    ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java

Added: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/RecallBaselineEventEventRelationAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/RecallBaselineEventEventRelationAnnotator.java?rev=1493821&view=auto
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/RecallBaselineEventEventRelationAnnotator.java
(added)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/RecallBaselineEventEventRelationAnnotator.java
Mon Jun 17 15:41:39 2013
@@ -0,0 +1,79 @@
+package org.apache.ctakes.temporal.ae.baselines;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ctakes.relationextractor.ae.RelationExtractorAnnotator;
+import org.apache.ctakes.typesystem.type.textsem.EventMention;
+import org.apache.ctakes.typesystem.type.textspan.Sentence;
+import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.tcas.Annotation;
+import org.apache.uima.resource.ResourceInitializationException;
+import org.cleartk.classifier.CleartkAnnotator;
+import org.cleartk.classifier.Feature;
+import org.cleartk.classifier.jar.GenericJarClassifierFactory;
+import org.uimafit.factory.AnalysisEngineFactory;
+import org.uimafit.util.JCasUtil;
+
+public class RecallBaselineEventEventRelationAnnotator extends
+		RelationExtractorAnnotator {
+	  public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
+		      throws ResourceInitializationException {
+		    return AnalysisEngineFactory.createPrimitiveDescription(
+		        RecallBaselineEventEventRelationAnnotator.class,
+		        CleartkAnnotator.PARAM_IS_TRAINING,
+		        false,
+		        GenericJarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH,
+		        new File(modelDirectory, "model.jar"));
+		  }
+
+	@Override
+	protected Class<? extends Annotation> getCoveringClass() {
+		return Sentence.class;
+	}
+
+	@Override
+	protected List<IdentifiedAnnotationPair> getCandidateRelationArgumentPairs(
+			JCas jCas, Annotation sentence) {
+	    List<IdentifiedAnnotationPair> results = new ArrayList<IdentifiedAnnotationPair>();
+	    // get all event mentions in the sentence
+	    List<EventMention> events = JCasUtil.selectCovered(jCas, EventMention.class, sentence);
+	    
+	    // filter out all the ctakes-generated events with more specific types
+	    List<EventMention> realEvents = new ArrayList<EventMention>();
+	    for(EventMention event : events){
+	    	if(event.getClass().equals(EventMention.class)){
+	    		realEvents.add(event);
+	    	}
+	    }
+	    events = realEvents;
+	    
+	    // if we still have more than 1 we can continue
+	    if(events.size() < 2) {
+	      return results;
+	    }
+	    
+	    // left-most event is the anchor and we will say all others are contained by it.
+	    EventMention anchor = events.get(0);
+	    for(int i = 1; i < events.size(); i++){
+	          IdentifiedAnnotationPair pair = new IdentifiedAnnotationPair(anchor, events.get(i));
+	          results.add(pair);
+	    }
+	    
+	    return results;
+	}
+	
+	/*
+	 * For this method, we simply return the positive label "CONTAINS". All of the work in the
baseline is
+	 * done by getCandidateRelationArgumentPairs().
+	 * 
+	 * (non-Javadoc)
+	 * @see org.apache.ctakes.relationextractor.ae.RelationExtractorAnnotator#classify(java.util.List)
+	 */
+	@Override
+	public String classify(List<Feature> features) {
+		return "CONTAINS";
+	}
+}

Propchange: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/RecallBaselineEventEventRelationAnnotator.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/TreeHeightBaseline.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/TreeHeightBaseline.java?rev=1493821&view=auto
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/TreeHeightBaseline.java
(added)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/TreeHeightBaseline.java
Mon Jun 17 15:41:39 2013
@@ -0,0 +1,98 @@
+package org.apache.ctakes.temporal.ae.baselines;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.ctakes.constituency.parser.util.AnnotationTreeUtils;
+import org.apache.ctakes.relationextractor.ae.RelationExtractorAnnotator;
+import org.apache.ctakes.relationextractor.ae.features.RelationFeaturesExtractor;
+import org.apache.ctakes.typesystem.type.syntax.TreebankNode;
+import org.apache.ctakes.typesystem.type.textsem.EventMention;
+import org.apache.ctakes.typesystem.type.textspan.Sentence;
+import org.apache.uima.analysis_engine.AnalysisEngineDescription;
+import org.apache.uima.jcas.JCas;
+import org.apache.uima.jcas.tcas.Annotation;
+import org.apache.uima.resource.ResourceInitializationException;
+import org.cleartk.classifier.CleartkAnnotator;
+import org.cleartk.classifier.Feature;
+import org.cleartk.classifier.jar.GenericJarClassifierFactory;
+import org.uimafit.factory.AnalysisEngineFactory;
+import org.uimafit.util.JCasUtil;
+
+public class TreeHeightBaseline extends RelationExtractorAnnotator {
+
+	  public static AnalysisEngineDescription createAnnotatorDescription(File modelDirectory)
+		      throws ResourceInitializationException {
+		    return AnalysisEngineFactory.createPrimitiveDescription(
+		        TreeHeightBaseline.class,
+		        CleartkAnnotator.PARAM_IS_TRAINING,
+		        false,
+		        GenericJarClassifierFactory.PARAM_CLASSIFIER_JAR_PATH,
+		        new File(modelDirectory, "model.jar"));
+		  }
+
+	@Override
+	protected Class<? extends Annotation> getCoveringClass() {
+		return Sentence.class;
+	}
+	
+	@Override
+	public String classify(List<Feature> features) {
+		return "CONTAINS";
+	}
+	
+	@Override
+	protected List<RelationFeaturesExtractor> getFeatureExtractors() {
+		return new ArrayList<RelationFeaturesExtractor>();
+	}
+
+	@Override
+	protected List<IdentifiedAnnotationPair> getCandidateRelationArgumentPairs(
+			JCas jCas, Annotation sentence) {
+	    List<IdentifiedAnnotationPair> results = new ArrayList<IdentifiedAnnotationPair>();
+
+	    // get all event mentions in the sentence
+	    List<EventMention> events = JCasUtil.selectCovered(jCas, EventMention.class, sentence);
+	    
+	    // filter out all the ctakes-generated events with more specific types
+	    List<EventMention> realEvents = new ArrayList<EventMention>();
+	    for(EventMention event : events){
+	    	if(event.getClass().equals(EventMention.class)){
+	    		realEvents.add(event);
+	    	}
+	    }
+	    events = realEvents;
+	    
+	    // if we still have more than 1 we can continue
+	    if(events.size() < 2) {
+	      return results;
+	    }
+	    
+	    // for each event, cmopute the tree distance to the root, and call the closest to the
root the anchor.
+	    int minDepth = Integer.MAX_VALUE;
+	    EventMention anchorMention = null;
+	    for(EventMention event : events){
+	    	TreebankNode node = AnnotationTreeUtils.annotationNode(jCas, event);
+	    	int depth = 0;
+	    	while(node.getParent() != null){
+	    		depth++;
+	    		node = node.getParent();
+	    	}
+	    	if(depth < minDepth){
+	    		minDepth = depth;
+	    		anchorMention = event;
+	    	}
+	    }
+	    
+	    // now that we have the anchor, connect every other mention to it:
+	    for(EventMention event : events){
+	    	if(event != anchorMention){
+	    		results.add(new IdentifiedAnnotationPair(anchorMention, event));
+	    	}
+	    }
+	    
+	    return results;
+	}
+
+}

Propchange: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/ae/baselines/TreeHeightBaseline.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java?rev=1493821&r1=1493820&r2=1493821&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventEventRelations.java
Mon Jun 17 15:41:39 2013
@@ -9,11 +9,11 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.ctakes.relationextractor.eval.RelationExtractorEvaluation.HashableArguments;
-import org.apache.ctakes.relationextractor.eval.RelationExtractorEvaluation.ParameterSettings;
 import org.apache.ctakes.temporal.ae.EventEventRelationAnnotator;
-import org.apache.ctakes.temporal.eval.EvaluationOfTemporalRelations.RemoveCrossSentenceRelations;
-import org.apache.ctakes.temporal.eval.EvaluationOfTemporalRelations.RemoveNonContainsRelations;
-import org.apache.ctakes.temporal.eval.EvaluationOfTemporalRelations.RemoveRelations;
+import org.apache.ctakes.temporal.eval.EvaluationOfEventTimeRelations.ParameterSettings;
+import org.apache.ctakes.temporal.eval.EvaluationOfEventTimeRelations.RemoveCrossSentenceRelations;
+import org.apache.ctakes.temporal.eval.EvaluationOfEventTimeRelations.RemoveNonContainsRelations;
+import org.apache.ctakes.temporal.eval.EvaluationOfEventTimeRelations.RemoveRelations;
 import org.apache.ctakes.typesystem.type.relation.BinaryTextRelation;
 import org.apache.ctakes.typesystem.type.textsem.EventMention;
 import org.apache.ctakes.typesystem.type.textsem.TimeMention;
@@ -40,6 +40,7 @@ import com.lexicalscope.jewel.cli.CliFac
 public class EvaluationOfEventEventRelations extends
 EvaluationOfTemporalRelations_ImplBase {
 
+	private boolean baseline = false;
   public EvaluationOfEventEventRelations(      
       File baseDirectory,
       File rawTextDirectory,
@@ -48,10 +49,11 @@ EvaluationOfTemporalRelations_ImplBase {
       File treebankDirectory,
       boolean printErrors,
       boolean printRelations,
+      boolean baseline,
       ParameterSettings params){
     super(baseDirectory, rawTextDirectory, knowtatorXMLDirectory, xmiDirectory,
         treebankDirectory, printErrors, printRelations, params);
-
+    this.baseline = baseline;
   }
 
   @Override
@@ -115,9 +117,6 @@ EvaluationOfTemporalRelations_ImplBase {
         GOLD_VIEW_NAME);
 
     aggregateBuilder.add(AnalysisEngineFactory.createPrimitiveDescription(RemoveRelations.class));
-    // TODO -- if we implement a baseline
-    //	    aggregateBuilder.add(this.baseline ? RecallBaselineEventTimeRelationAnnotator.createAnnotatorDescription(directory)
:
-    //	    	EventTimeRelationAnnotator.createAnnotatorDescription(directory));
     aggregateBuilder.add(
         EventEventRelationAnnotator.createAnnotatorDescription(directory));
 
@@ -194,6 +193,7 @@ EvaluationOfTemporalRelations_ImplBase {
         options.getTreebankDirectory(),
         options.getPrintErrors(),
         options.getPrintFormattedRelations(),
+        options.getBaseline(),
         params);
     evaluation.prepareXMIsFor(patientSets);
     List<Integer> training = trainItems;

Copied: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
(from r1493804, ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java)
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java?p2=ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java&p1=ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java&r1=1493804&r2=1493821&rev=1493821&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
Mon Jun 17 15:41:39 2013
@@ -20,12 +20,11 @@ package org.apache.ctakes.temporal.eval;
 
 import java.io.File;
 import java.net.URI;
+import java.util.ArrayDeque;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.ArrayDeque;
 import java.util.Collection;
 import java.util.Collections;
-import java.util.HashMap;
 import java.util.Deque;
 import java.util.List;
 import java.util.Map;
@@ -34,6 +33,7 @@ import java.util.Set;
 import org.apache.ctakes.relationextractor.eval.RelationExtractorEvaluation.HashableArguments;
 import org.apache.ctakes.temporal.ae.EventTimeRelationAnnotator;
 import org.apache.ctakes.temporal.ae.baselines.RecallBaselineEventTimeRelationAnnotator;
+import org.apache.ctakes.temporal.eval.Evaluation_ImplBase.CopyFromGold;
 import org.apache.ctakes.typesystem.type.relation.BinaryTextRelation;
 import org.apache.ctakes.typesystem.type.relation.RelationArgument;
 import org.apache.ctakes.typesystem.type.textsem.EventMention;
@@ -63,18 +63,16 @@ import org.uimafit.testing.util.HideOutp
 import org.uimafit.util.JCasUtil;
 
 import com.google.common.base.Function;
-import com.google.common.base.Functions;
 import com.google.common.collect.HashMultimap;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
-import com.google.common.collect.Ordering;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.Sets;
 import com.lexicalscope.jewel.cli.CliFactory;
 import com.lexicalscope.jewel.cli.Option;
 
-public class EvaluationOfTemporalRelations extends
-	Evaluation_ImplBase<AnnotationStatistics<String>>{
+public class EvaluationOfEventTimeRelations extends
+	EvaluationOfTemporalRelations_ImplBase{
   static interface TempRelOptions extends Evaluation_ImplBase.Options{
 	  @Option
 	  public boolean getTest();
@@ -89,15 +87,15 @@ public class EvaluationOfTemporalRelatio
     public boolean getClosure();
   }
   
-  protected static boolean DEFAULT_BOTH_DIRECTIONS = false;
-  protected static float DEFAULT_DOWNSAMPLE = 1.0f;
-  private static double DEFAULT_SVM_C = 1.0;
-  private static double DEFAULT_SVM_G = 1.0;
-  private static double DEFAULT_TK = 0.5;
-  private static double DEFAULT_LAMBDA = 0.5;
+//  protected static boolean DEFAULT_BOTH_DIRECTIONS = false;
+//  protected static float DEFAULT_DOWNSAMPLE = 1.0f;
+//  private static double DEFAULT_SVM_C = 1.0;
+//  private static double DEFAULT_SVM_G = 1.0;
+//  private static double DEFAULT_TK = 0.5;
+//  private static double DEFAULT_LAMBDA = 0.5;
   
-  protected static ParameterSettings defaultParams = new ParameterSettings(DEFAULT_BOTH_DIRECTIONS,
DEFAULT_DOWNSAMPLE, "tk",
-  		  DEFAULT_SVM_C, DEFAULT_SVM_G, "polynomial", ComboOperator.SUM, DEFAULT_TK, DEFAULT_LAMBDA);
+//  defaultParams = new ParameterSettings(DEFAULT_BOTH_DIRECTIONS, DEFAULT_DOWNSAMPLE, "tk",
+//  		  DEFAULT_SVM_C, DEFAULT_SVM_G, "polynomial", ComboOperator.SUM, DEFAULT_TK, DEFAULT_LAMBDA);
   protected static ParameterSettings flatParams = new ParameterSettings(DEFAULT_BOTH_DIRECTIONS,
DEFAULT_DOWNSAMPLE, "linear",
 		  10.0, 1.0, "linear", ComboOperator.VECTOR_ONLY, DEFAULT_TK, DEFAULT_LAMBDA);
   protected static ParameterSettings allBagsParams = new ParameterSettings(DEFAULT_BOTH_DIRECTIONS,
DEFAULT_DOWNSAMPLE, "tk", 
@@ -128,7 +126,7 @@ public class EvaluationOfTemporalRelatio
       File tempModelDir = File.createTempFile("temporal", null, workingDir);
       tempModelDir.delete();
       tempModelDir.mkdir();
-      EvaluationOfTemporalRelations evaluation = new EvaluationOfTemporalRelations(
+      EvaluationOfEventTimeRelations evaluation = new EvaluationOfEventTimeRelations(
           tempModelDir,
           options.getRawTextDirectory(),
           options.getKnowtatorXMLDirectory(),
@@ -174,7 +172,7 @@ public class EvaluationOfTemporalRelatio
   protected boolean useClosure; 
   protected boolean printRelations = false;
   
-  public EvaluationOfTemporalRelations(
+  public EvaluationOfEventTimeRelations(
       File baseDirectory,
       File rawTextDirectory,
       File knowtatorXMLDirectory,
@@ -191,7 +189,10 @@ public class EvaluationOfTemporalRelatio
         rawTextDirectory,
         knowtatorXMLDirectory,
         xmiDirectory,
-        treebankDirectory);
+        treebankDirectory,
+        printErrors,
+        printRelations,
+        params);
     this.params = params;
     this.useClosure = useClosure;
     this.printErrors = printErrors;
@@ -200,13 +201,13 @@ public class EvaluationOfTemporalRelatio
     this.kernelParams = kernelParams == null ? null : kernelParams.split(" ");
   }
 
-  public EvaluationOfTemporalRelations(File baseDirectory, File rawTextDirectory,
-      File knowtatorXMLDirectory, File xmiDirectory) {
-
-    super(baseDirectory, rawTextDirectory, knowtatorXMLDirectory, xmiDirectory, null);
-    this.params = defaultParams;
-    this.printErrors = false;
-  }
+//  public EvaluationOfTemporalRelations(File baseDirectory, File rawTextDirectory,
+//      File knowtatorXMLDirectory, File xmiDirectory) {
+//
+//    super(baseDirectory, rawTextDirectory, knowtatorXMLDirectory, xmiDirectory, null);
+//    this.params = defaultParams;
+//    this.printErrors = false;
+//  }
 
   @Override
   protected void train(CollectionReader collectionReader, File directory) throws Exception
{
@@ -346,6 +347,7 @@ public class EvaluationOfTemporalRelatio
     return stats;
   }
 
+  /*
   private static String formatRelation(BinaryTextRelation relation) {
 	  IdentifiedAnnotation arg1 = (IdentifiedAnnotation)relation.getArg1().getArgument();
 	  IdentifiedAnnotation arg2 = (IdentifiedAnnotation)relation.getArg2().getArgument();
@@ -385,7 +387,8 @@ public class EvaluationOfTemporalRelatio
 				  fileName, category, arg1Type, arg1Begin, arg1End, arg2Type, arg2Begin, arg2End);
 	  }
   }
-
+*/
+  
   public static class RemoveEventEventRelations extends JCasAnnotator_ImplBase {
     public static final String PARAM_RELATION_VIEW = "RelationView";
 	@ConfigurationParameter(name = PARAM_RELATION_VIEW)

Propchange: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfEventTimeRelations.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java?rev=1493821&r1=1493820&r2=1493821&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/EvaluationOfTemporalRelations_ImplBase.java
Mon Jun 17 15:41:39 2013
@@ -3,7 +3,7 @@ package org.apache.ctakes.temporal.eval;
 import java.io.File;
 import java.util.Collection;
 
-import org.apache.ctakes.relationextractor.eval.RelationExtractorEvaluation.ParameterSettings;
+import org.apache.ctakes.temporal.eval.EvaluationOfEventTimeRelations.ParameterSettings;
 import org.apache.ctakes.typesystem.type.relation.BinaryTextRelation;
 import org.apache.ctakes.typesystem.type.relation.RelationArgument;
 import org.apache.ctakes.typesystem.type.textsem.EventMention;
@@ -12,6 +12,7 @@ import org.apache.uima.analysis_engine.A
 import org.apache.uima.cas.CAS;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.tcas.Annotation;
+import org.cleartk.classifier.tksvmlight.model.CompositeKernel.ComboOperator;
 import org.cleartk.eval.AnnotationStatistics;
 import org.uimafit.component.JCasAnnotator_ImplBase;
 import org.uimafit.descriptor.ConfigurationParameter;
@@ -44,8 +45,8 @@ public abstract class EvaluationOfTempor
 	  protected static double DEFAULT_TK = 0.5;
 	  protected static double DEFAULT_LAMBDA = 0.5;
 	  
-	  protected static ParameterSettings defaultParams = null; //new ParameterSettings(DEFAULT_BOTH_DIRECTIONS,
DEFAULT_DOWNSAMPLE, "linear",
-	  		  //DEFAULT_SVM_C, DEFAULT_SVM_G, "polynomial", ComboOperator.SUM, DEFAULT_TK, DEFAULT_LAMBDA);
+	  protected static ParameterSettings defaultParams = new ParameterSettings(DEFAULT_BOTH_DIRECTIONS,
DEFAULT_DOWNSAMPLE, "linear",
+	  		  DEFAULT_SVM_C, DEFAULT_SVM_G, "polynomial", ComboOperator.SUM, DEFAULT_TK, DEFAULT_LAMBDA);
 
 	  
 	  protected ParameterSettings params = null;

Modified: ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java?rev=1493821&r1=1493820&r2=1493821&view=diff
==============================================================================
--- ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
(original)
+++ ctakes/trunk/ctakes-temporal/src/main/java/org/apache/ctakes/temporal/eval/Evaluation_ImplBase.java
Mon Jun 17 15:41:39 2013
@@ -124,7 +124,7 @@ public abstract class Evaluation_ImplBas
     public boolean getPrintErrors();
     
     @Option(longName = "kernelParams", defaultToNull=true)
-    public String getKernelParams();    
+    public String getKernelParams();
   }
 
   protected File rawTextDirectory;



Mime
View raw message