ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From james-mas...@apache.org
Subject svn commit: r1500617 - /ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/train/ReadPreprocessTrainTestJudge.java
Date Mon, 08 Jul 2013 09:11:17 GMT
Author: james-masanz
Date: Mon Jul  8 09:11:16 2013
New Revision: 1500617

URL: http://svn.apache.org/r1500617
Log:
new 'wrapper'. see AssertionConst for shared constants, using that class rather than having
run configs that must be kept in sync

Added:
    ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/train/ReadPreprocessTrainTestJudge.java
  (with props)

Added: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/train/ReadPreprocessTrainTestJudge.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/train/ReadPreprocessTrainTestJudge.java?rev=1500617&view=auto
==============================================================================
--- ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/train/ReadPreprocessTrainTestJudge.java
(added)
+++ ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/train/ReadPreprocessTrainTestJudge.java
Mon Jul  8 09:11:16 2013
@@ -0,0 +1,56 @@
+package org.apache.ctakes.assertion.train;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+import org.apache.ctakes.assertion.eval.AssertionEvaluation;
+import org.apache.ctakes.assertion.pipelines.RunJudgeAttributeInstances;
+import org.apache.ctakes.assertion.util.AssertionConst;
+import org.kohsuke.args4j.Option;
+
+import scala.actors.threadpool.Arrays;
+
+public class ReadPreprocessTrainTestJudge {
+
+	public static void main(String[] args) throws Exception {
+	
+		ReadAndPreprocessForAttributeModels.main(null);
+		
+		TrainAttributeModels.main(null);
+		
+		TestAttributeModels.main(null);
+
+
+
+		// Set up parameters for judging test
+		// output of test step becomes input for runjudge
+		ArrayList<String> params;
+		params = new ArrayList<String>();
+		
+		//@Option(
+		//		name = "--input-dir",
+		//		usage = "where to read the fully-annotated xmi data from",
+		//		required = true)
+		//		public String inputDir = AssertionConst.evalOutputDir;
+		params.add("--input-dir");
+		params.add(AssertionConst.evalOutputDir);
+
+		//@Option(
+		//		name = "--output-dir",
+		//		usage = "where to write the 'adjudicated' instances in xmi format to",
+		//		required = true)
+		//		public String outputDir = AssertionConst.instanceGatheringOutputDir;
+		params.add("--output-dir");
+		params.add(AssertionConst.instanceGatheringOutputDir);
+		
+		String [] parmsAsArray;
+		parmsAsArray = params.toArray(new String[] {});
+		
+		RunJudgeAttributeInstances.main(parmsAsArray);
+
+		// Run the actual assertion preprocessing on just one data source
+		if (true) /** TODO Should this be done here? **/ AssertionEvaluation.main(parmsAsArray);
+
+	}
+}

Propchange: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/train/ReadPreprocessTrainTestJudge.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain



Mime
View raw message