ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1704676 - /ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java
Date Tue, 22 Sep 2015 17:49:27 GMT
Author: tmill
Date: Tue Sep 22 17:49:25 2015
New Revision: 1704676

URL: http://svn.apache.org/viewvc?rev=1704676&view=rev
Log:
Change handling of kernel parameters in options.

Modified:
    ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java

Modified: ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java
URL: http://svn.apache.org/viewvc/ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java?rev=1704676&r1=1704675&r2=1704676&view=diff
==============================================================================
--- ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java
(original)
+++ ctakes/sandbox/ctakes-coref-cleartk/src/main/java/org/apache/ctakes/coreference/eval/EvaluationOfEventCoreference.java
Tue Sep 22 17:49:25 2015
@@ -88,7 +88,7 @@ import org.apache.uima.util.FileUtils;
 import org.cleartk.eval.AnnotationStatistics;
 import org.cleartk.ml.jar.JarClassifierBuilder;
 import org.cleartk.ml.liblinear.LibLinearStringOutcomeDataWriter;
-import org.cleartk.ml.libsvm.LibSvmStringOutcomeDataWriter;
+import org.cleartk.ml.svmlight.SvmLightStringOutcomeDataWriter;
 import org.cleartk.ml.tksvmlight.model.CompositeKernel.ComboOperator;
 import org.cleartk.util.ViewUriUtil;
 
@@ -165,7 +165,7 @@ public class EvaluationOfEventCoreferenc
 
     params.stats = eval.trainAndTest(trainItems, testItems);//training);//
     //      System.err.println(options.getKernelParams() == null ? params : options.getKernelParams());
-    System.err.println(params.stats);
+//    System.err.println(params.stats);
 
     if(options.getUseTmp()){
       FileUtils.deleteRecursive(workingDir);
@@ -221,7 +221,7 @@ public class EvaluationOfEventCoreferenc
     super(baseDirectory, rawTextDirectory, xmlDirectory, xmlFormat, subcorpus, xmiDirectory,
         treebankDirectory, printErrors, printRelations, params);
     this.outputDirectory = outputDirectory;
-    this.kernelParams = cmdParams == null ? null : cmdParams.split(" ");
+    this.kernelParams = cmdParams == null ? null : cmdParams.replace("\"", "").split(" ");
   }
 
   @Override
@@ -257,7 +257,7 @@ public class EvaluationOfEventCoreferenc
 //            LibSvmStringOutcomeDataWriter.class,
             LibLinearStringOutcomeDataWriter.class,
 //            MalletStringOutcomeDataWriter.class,
-            
+//            SvmLightStringOutcomeDataWriter.class, 
 //            TkLibSvmStringOutcomeDataWriter.class,
             directory,
             params.probabilityOfKeepingANegativeExample
@@ -292,9 +292,6 @@ public class EvaluationOfEventCoreferenc
       optArray = svmOptions.toArray(new String[]{});
     }else{
       optArray = this.kernelParams;
-      for(int i = 0; i < optArray.length; i+=2){
-        optArray[i] = "-" + optArray[i];
-      }
     }
     JarClassifierBuilder.trainAndPackage(directory, optArray);
   }



Mime
View raw message