ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seanfi...@apache.org
Subject svn commit: r1764818 - in /ctakes/trunk/ctakes-distribution/src/main/bin: runClinicalPipeline.bat runClinicalPipeline.sh
Date Fri, 14 Oct 2016 06:33:11 GMT
Author: seanfinan
Date: Fri Oct 14 06:33:11 2016
New Revision: 1764818

URL: http://svn.apache.org/viewvc?rev=1764818&view=rev
Log:
Simple cli to run clinical pipeline on a directory of files, writing xmis if desired

Added:
    ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.bat
    ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.sh

Added: ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.bat
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.bat?rev=1764818&view=auto
==============================================================================
--- ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.bat (added)
+++ ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.bat Fri Oct 14 06:33:11
2016
@@ -0,0 +1,48 @@
+@ECHO OFF
+::
+:: Licensed to the Apache Software Foundation (ASF) under one
+:: or more contributor license agreements.  See the NOTICE file
+:: distributed with this work for additional information
+:: regarding copyright ownership.  The ASF licenses this file
+:: to you under the Apache License, Version 2.0 (the
+:: "License"); you may not use this file except in compliance
+:: with the License.  You may obtain a copy of the License at
+::
+::   http://www.apache.org/licenses/LICENSE-2.0
+::
+:: Unless required by applicable law or agreed to in writing,
+:: software distributed under the License is distributed on an
+:: "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+:: KIND, either express or implied.  See the License for the
+:: specific language governing permissions and limitations
+:: under the License.
+::
+::
+::   Runs the default clinical pipeline on files in the input directory specified by -i {directory}
+::   Writes .xmi files to the output directory specified by --xmiOut {directory}
+::   Uses UMLS credentials specified by --user {username} --pass {password}
+::
+::
+:: Requires JAVA JDK 1.8+
+::
+
+@REM Guess CTAKES_HOME if not defined
+set CURRENT_DIR=%cd%
+if not "%CTAKES_HOME%" == "" goto gotHome
+set CTAKES_HOME=%CURRENT_DIR%
+if exist "%CTAKES_HOME%\bin\runctakesCVD.bat" goto okHome
+cd ..
+set CTAKES_HOME=%cd%
+
+:gotHome
+if exist "%CTAKES_HOME%\bin\runctakesCVD.bat" goto okHome
+echo The CTAKES_HOME environment variable is not defined correctly
+echo This environment variable is needed to run this program
+goto end
+
+:okHome
+@set PATH=%PATH%;%CTAKES_HOME%\lib\auth\x64
+cd %CTAKES_HOME%
+java -cp "%CTAKES_HOME%/desc/;%CTAKES_HOME%/resources/;%CTAKES_HOME%/lib/*" -Dlog4j.configuration=file:/%CTAKES_HOME%/config/log4j.xml
-Xms512M -Xmx3g org.apache.ctakes.core.pipeline.PiperFileRunner -p org/apache/ctakes/clinical/pipeline/DefaultClinicalPipeline.piper
%*
+cd %CURRENT_DIR%
+:end
\ No newline at end of file

Added: ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.sh
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.sh?rev=1764818&view=auto
==============================================================================
--- ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.sh (added)
+++ ctakes/trunk/ctakes-distribution/src/main/bin/runClinicalPipeline.sh Fri Oct 14 06:33:11
2016
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+#
+#   Runs the default clinical pipeline on files in the input directory specified by -i {directory}
+#   Writes .xmi files to the output directory specified by --xmiOut {directory}
+#   Uses UMLS credentials specified by --user {username} --pass {password}
+#
+#
+# Requires JAVA JDK 1.8+
+#
+
+PRG="$0"
+while [ -h "$PRG" ]; do
+  ls=`ls -ld "$PRG"`
+  link=`expr "$ls" : '.*-> \(.*\)$'`
+  if expr "$link" : '/.*' > /dev/null; then
+    PRG="$link"
+  else
+    PRG=`dirname "$PRG"`/"$link"
+  fi
+done
+PRGDIR=`dirname "$PRG"`
+
+# Only set CTAKES_HOME if not already set
+[ -z "$CTAKES_HOME" ] && CTAKES_HOME=`cd "$PRGDIR/.." >/dev/null; pwd`
+
+cd $CTAKES_HOME
+java -cp $CTAKES_HOME/desc/:$CTAKES_HOME/resources/:$CTAKES_HOME/lib/* -Dlog4j.configuration=file:$CTAKES_HOME/config/log4j.xml
-Xms512M -Xmx3g org.apache.ctakes.core.pipeline.PiperFileRunner -p org/apache/ctakes/clinical/pipeline/DefaultClinicalPipeline.piper
"$@"



Mime
View raw message