You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ctakes.apache.org by ja...@apache.org on 2014/01/15 22:07:01 UTC
svn commit: r1558563 -
/ctakes/trunk/ctakes-core/scripts/groovy/run_cTAKES.groovy
Author: james-masanz
Date: Wed Jan 15 21:07:00 2014
New Revision: 1558563
URL: http://svn.apache.org/r1558563
Log:
CTAKES-273 - when script sets up classpath, add ctakes-resources to classpath before ctakes so the full, separately-downloadable resources are used such as for LVG rather than the partial/small resources that are included within cTAKES.
Modified:
ctakes/trunk/ctakes-core/scripts/groovy/run_cTAKES.groovy
Modified: ctakes/trunk/ctakes-core/scripts/groovy/run_cTAKES.groovy
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-core/scripts/groovy/run_cTAKES.groovy?rev=1558563&r1=1558562&r2=1558563&view=diff
==============================================================================
--- ctakes/trunk/ctakes-core/scripts/groovy/run_cTAKES.groovy (original)
+++ ctakes/trunk/ctakes-core/scripts/groovy/run_cTAKES.groovy Wed Jan 15 21:07:00 2014
@@ -28,7 +28,9 @@ println("Starting " + this.class.getName
// TODO improve handling of whether user enters a trailing slash for these two constants:
def cTAKES_HOME = "/C:/Apache-cTAKES/apache-ctakes-3.1.1/";
+cTAKES_HOME = "/C:/Apps/Apache-cTAKES/3.1.1-from-bin-zip/apache-ctakes-3.1.1/";
def EXTERNAL_RESOURCE_PATH = "/C:/parent-of-ctakes-resources";
+EXTERNAL_RESOURCE_PATH = "/C:/usr/data/cTAKES-resources";
println("Using cTAKES in " + cTAKES_HOME);
@@ -61,6 +63,15 @@ for (int i=0; i<files.length; i++) {
}
}
+//println("TODO -- consider having script download and unzip ctakes-resources-3.1.0.zip to lib");
+//println("TODO -- download and unzip ctakes-resources-3.1.0.zip to lib");
+// Add the ctakesresources (UMLS dictionary, LVG database) that are separately downloadable
+// from the Apache cTAKES code itself to the classpath before adding
+// the resources from within the cTAKES install directory, so these are picked up first
+println("Adding ctakes-resources-3.1.0/resources to classpath"); // from ctakes-resources-3.1.0.zip
+this.class.classLoader.rootLoader.addURL( new URL("file://" + EXTERNAL_RESOURCE_PATH + "/ctakes-resources-3.1.0/resources/") );
+
+
// Add cTAKES' resources directory to classpath
def subdir = "resources/";
println("Adding cTAKES subdir called " + subdir + " to classpath");
@@ -75,14 +86,6 @@ println("Adding cTAKES subdir called " +
this.class.classLoader.rootLoader.addURL( new URL("file://" + cTAKES_HOME + subdir));
-//println("TODO -- consider having script download and unzip ctakes-resources-3.1.0.zip to lib");
-// Add the ctakesresources (UMLS dictionary, LVG database) to the classpath
-//println("TODO -- download and unzip ctakes-resources-3.1.0.zip to lib");
-println("Adding ctakes-resources-3.1.0/resources to classpath");
-// from ctakes-resources-3.1.0.zip
-this.class.classLoader.rootLoader.addURL( new URL("file://" + EXTERNAL_RESOURCE_PATH + "/ctakes-resources-3.1.0/resources/") );
-
-
if (args.length < 1) {
println("Please specify input directory");
System.exit(1);
@@ -100,6 +103,6 @@ arguments[1] = cTAKES_HOME;
binding.setVariable("args", arguments);
GroovyShell shell = new GroovyShell(binding);
-Object value = shell.evaluate(new File('cTAKES-clinical-pipeline.groovy'));
+Object value = shell.evaluate(new File('cTAKES_clinical_pipeline.groovy'));
println("Done " + this.class.getName());