You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by Abraham Tom <at...@practicefusion.com> on 2014/04/12 17:55:16 UTC
Command line invocation
I am not a core java developer, I am a Hadoop data guy
We are experimenting with using cTakes and we have no Java developers in house
I am trying to invoke ClinicalPipelineWithUmls on a server where I installed the developer cTakes. This invocation is done via the following command line
java -verbose -cp "/opt/cTAKES-3.1.1/ctakes-clinical-pipeline/target/classes;/home/mapr/.m2/repository/org/cleartk/cleartk-util/0.9.2/cleartk-util-0.9.2.jar" org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
but I am getting a Class not found error
I would like to invoke via command line so that I can wrap a shell script around it and automate the processing of various docs.
This should be possible shouldn't it?
Best regards,
Abraham Tom
RE: Command line invocation
Posted by "Masanz, James J." <Ma...@mayo.edu>.
Did you by chance miss the step where you
"Download the cTAKES resources ZIP file with a matching version from the ctakesresources project"
Do you have a directory such as
resources/org/apache/ctakes/dictionary/lookup/umls*
such as
resources/org/apache/ctakes/dictionary/lookup/umls2011ab
-----Original Message-----
From: Abraham Tom [mailto:atom@practicefusion.com]
Sent: Sunday, April 13, 2014 11:49 AM
To: dev@ctakes.apache.org
Subject: RE: Command line invocation
Thanks for the information
I was on the developer version, but now I have reverted to the user version
I reinstalled cTakes, specifically apache-ctakes-3.1.0-bin.tar.gz and followed the instructions from https://cwiki.apache.org/confluence/display/CTAKES/cTAKES+3.1+User+Install+Guide
Then I tried to execute the following
java -cp $CTAKES_HOME/lib/*:$CTAKES_HOME/desc/:$CTAKES_HOME/resources/ -Xms512M -Xmx1024M org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
and I got the following message
Exception in thread "main" org.apache.uima.resource.ResourceInitializationException
Then I tried to invoke the jar intself
java -jar -Xms512M -Xmx1024M ./lib/ctakes-clinical-pipeline-3.1.0.jar
but I got the following error
Failed to load Main-Class manifest attribute from
./lib/ctakes-clinical-pipeline-3.1.0.jar
Groovy is an option if I there are instructions on how to use it
I would not mind helping to build those instructions to invoke specific classes
Best regards,
Abraham Tom
____________________________
Abraham Tom
Data Warehouse Engineer
-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
Sent: Sunday, April 13, 2014 5:32 AM
To: 'dev@ctakes.apache.org'
Subject: RE: Command line invocation
Yes, that's possible.
You need more things on your classpath - you can take a look at the classpath within runctakesCVD.bat
Or if you are open to using groovy, take a look at the scripts directory within ctakes-core
-----Original Message-----
From: Abraham Tom [mailto:atom@practicefusion.com]
Sent: Saturday, April 12, 2014 10:55 AM
To: dev@ctakes.apache.org
Subject: Command line invocation
I am not a core java developer, I am a Hadoop data guy We are experimenting with using cTakes and we have no Java developers in house
I am trying to invoke ClinicalPipelineWithUmls on a server where I installed the developer cTakes. This invocation is done via the following command line
java -verbose -cp "/opt/cTAKES-3.1.1/ctakes-clinical-pipeline/target/classes;/home/mapr/.m2/repository/org/cleartk/cleartk-util/0.9.2/cleartk-util-0.9.2.jar" org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
but I am getting a Class not found error
I would like to invoke via command line so that I can wrap a shell script around it and automate the processing of various docs.
This should be possible shouldn't it?
Best regards,
Abraham Tom
RE: Command line invocation
Posted by Abraham Tom <at...@practicefusion.com>.
Thanks for the information
I was on the developer version, but now I have reverted to the user version
I reinstalled cTakes, specifically apache-ctakes-3.1.0-bin.tar.gz and followed the instructions from https://cwiki.apache.org/confluence/display/CTAKES/cTAKES+3.1+User+Install+Guide
Then I tried to execute the following
java -cp $CTAKES_HOME/lib/*:$CTAKES_HOME/desc/:$CTAKES_HOME/resources/ -Xms512M -Xmx1024M org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
and I got the following message
Exception in thread "main" org.apache.uima.resource.ResourceInitializationException
Then I tried to invoke the jar intself
java -jar -Xms512M -Xmx1024M ./lib/ctakes-clinical-pipeline-3.1.0.jar
but I got the following error
Failed to load Main-Class manifest attribute from
./lib/ctakes-clinical-pipeline-3.1.0.jar
Groovy is an option if I there are instructions on how to use it
I would not mind helping to build those instructions to invoke specific classes
Best regards,
Abraham Tom
____________________________
Abraham Tom
Data Warehouse Engineer
-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
Sent: Sunday, April 13, 2014 5:32 AM
To: 'dev@ctakes.apache.org'
Subject: RE: Command line invocation
Yes, that's possible.
You need more things on your classpath - you can take a look at the classpath within runctakesCVD.bat
Or if you are open to using groovy, take a look at the scripts directory within ctakes-core
-----Original Message-----
From: Abraham Tom [mailto:atom@practicefusion.com]
Sent: Saturday, April 12, 2014 10:55 AM
To: dev@ctakes.apache.org
Subject: Command line invocation
I am not a core java developer, I am a Hadoop data guy We are experimenting with using cTakes and we have no Java developers in house
I am trying to invoke ClinicalPipelineWithUmls on a server where I installed the developer cTakes. This invocation is done via the following command line
java -verbose -cp "/opt/cTAKES-3.1.1/ctakes-clinical-pipeline/target/classes;/home/mapr/.m2/repository/org/cleartk/cleartk-util/0.9.2/cleartk-util-0.9.2.jar" org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
but I am getting a Class not found error
I would like to invoke via command line so that I can wrap a shell script around it and automate the processing of various docs.
This should be possible shouldn't it?
Best regards,
Abraham Tom
RE: Command line invocation
Posted by "Miller, Timothy" <Ti...@childrens.harvard.edu>.
It does look like that class has hardcoded paths. There may be another pipeline that is appropriate -- what kind of output are you looking to get from your documents?
Tim
________________________________________
From: Abraham Tom [atom@practicefusion.com]
Sent: Tuesday, April 15, 2014 12:08 AM
To: dev@ctakes.apache.org
Subject: RE: Command line invocation
Update
java -cp $CTAKES_HOME/lib/*:$CTAKES_HOME/desc/:$CTAKES_HOME/resources/ -Dlog4j.configuration=file:$CTAKES_HOME/config/log4j.xml -Xms512M -Xmx1024M org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls /opt/cTAKES-3.1.1/data/test01.txt /opt/cTAKES-3.1.1/data_out/
Exception in thread "main" org.apache.uima.resource.ResourceInitializationException
at org.cleartk.util.cr.FilesCollectionReader.initialize(FilesCollectionReader.java:251)
at org.uimafit.component.JCasCollectionReader_ImplBase.initialize(JCasCollectionReader_ImplBase.java:57)
at org.apache.uima.collection.CollectionReader_ImplBase.initialize(CollectionReader_ImplBase.java:71)
at org.apache.uima.impl.CollectionReaderFactory_impl.produceResource(CollectionReaderFactory_impl.java:103)
at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:269)
at org.apache.uima.UIMAFramework.produceCollectionReader(UIMAFramework.java:711)
at org.uimafit.factory.CollectionReaderFactory.createCollectionReader(CollectionReaderFactory.java:171)
at org.cleartk.util.cr.FilesCollectionReader.getCollectionReader(FilesCollectionReader.java:88)
at org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls.main(ClinicalPipelineWithUmls.java:56)
Caused by: java.io.IOException: file or directory /sharp-home/assertion/data/ActiveLearning/plaintext does not exist
... 10 more
file or directory /sharp-home/assertion/data/ActiveLearning/plaintext
does this mean I cannot pass a directory and file in and I have to use the expected directory?
Best regards,
Abraham Tom
____________________________
Abraham Tom
-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
Sent: Sunday, April 13, 2014 5:32 AM
To: 'dev@ctakes.apache.org'
Subject: RE: Command line invocation
Yes, that's possible.
You need more things on your classpath - you can take a look at the classpath within runctakesCVD.bat
Or if you are open to using groovy, take a look at the scripts directory within ctakes-core
-----Original Message-----
From: Abraham Tom [mailto:atom@practicefusion.com]
Sent: Saturday, April 12, 2014 10:55 AM
To: dev@ctakes.apache.org
Subject: Command line invocation
I am not a core java developer, I am a Hadoop data guy We are experimenting with using cTakes and we have no Java developers in house
I am trying to invoke ClinicalPipelineWithUmls on a server where I installed the developer cTakes. This invocation is done via the following command line
java -verbose -cp "/opt/cTAKES-3.1.1/ctakes-clinical-pipeline/target/classes;/home/mapr/.m2/repository/org/cleartk/cleartk-util/0.9.2/cleartk-util-0.9.2.jar" org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
but I am getting a Class not found error
I would like to invoke via command line so that I can wrap a shell script around it and automate the processing of various docs.
This should be possible shouldn't it?
Best regards,
Abraham Tom
RE: Command line invocation
Posted by Abraham Tom <at...@practicefusion.com>.
Update
java -cp $CTAKES_HOME/lib/*:$CTAKES_HOME/desc/:$CTAKES_HOME/resources/ -Dlog4j.configuration=file:$CTAKES_HOME/config/log4j.xml -Xms512M -Xmx1024M org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls /opt/cTAKES-3.1.1/data/test01.txt /opt/cTAKES-3.1.1/data_out/
Exception in thread "main" org.apache.uima.resource.ResourceInitializationException
at org.cleartk.util.cr.FilesCollectionReader.initialize(FilesCollectionReader.java:251)
at org.uimafit.component.JCasCollectionReader_ImplBase.initialize(JCasCollectionReader_ImplBase.java:57)
at org.apache.uima.collection.CollectionReader_ImplBase.initialize(CollectionReader_ImplBase.java:71)
at org.apache.uima.impl.CollectionReaderFactory_impl.produceResource(CollectionReaderFactory_impl.java:103)
at org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62)
at org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:269)
at org.apache.uima.UIMAFramework.produceCollectionReader(UIMAFramework.java:711)
at org.uimafit.factory.CollectionReaderFactory.createCollectionReader(CollectionReaderFactory.java:171)
at org.cleartk.util.cr.FilesCollectionReader.getCollectionReader(FilesCollectionReader.java:88)
at org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls.main(ClinicalPipelineWithUmls.java:56)
Caused by: java.io.IOException: file or directory /sharp-home/assertion/data/ActiveLearning/plaintext does not exist
... 10 more
file or directory /sharp-home/assertion/data/ActiveLearning/plaintext
does this mean I cannot pass a directory and file in and I have to use the expected directory?
Best regards,
Abraham Tom
____________________________
Abraham Tom
-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
Sent: Sunday, April 13, 2014 5:32 AM
To: 'dev@ctakes.apache.org'
Subject: RE: Command line invocation
Yes, that's possible.
You need more things on your classpath - you can take a look at the classpath within runctakesCVD.bat
Or if you are open to using groovy, take a look at the scripts directory within ctakes-core
-----Original Message-----
From: Abraham Tom [mailto:atom@practicefusion.com]
Sent: Saturday, April 12, 2014 10:55 AM
To: dev@ctakes.apache.org
Subject: Command line invocation
I am not a core java developer, I am a Hadoop data guy We are experimenting with using cTakes and we have no Java developers in house
I am trying to invoke ClinicalPipelineWithUmls on a server where I installed the developer cTakes. This invocation is done via the following command line
java -verbose -cp "/opt/cTAKES-3.1.1/ctakes-clinical-pipeline/target/classes;/home/mapr/.m2/repository/org/cleartk/cleartk-util/0.9.2/cleartk-util-0.9.2.jar" org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
but I am getting a Class not found error
I would like to invoke via command line so that I can wrap a shell script around it and automate the processing of various docs.
This should be possible shouldn't it?
Best regards,
Abraham Tom
RE: Command line invocation
Posted by Abraham Tom <at...@practicefusion.com>.
Hi
I have confirmed that the correct resources zip file was uncompressed and deployed to the correct path
java -jar ./lib/ctakes-clinical-pipeline-3.1.0.jar -Dctakes.umlsuser=<hidden> -Dctakes.umlspw=<hidden> -Xms512M -Xmx1024M /opt/cTAKES-3.1.1/data /opt/cTAKES-3.1.1/data_out
Failed to load Main-Class manifest attribute from
./lib/ctakes-clinical-pipeline-3.1.0.jar
Still resolving to the same error as if it cannot find appropriate dependancies
Can this jar (ctakes-clinical-pipeline-3.1.0.jar) not be called and used on its own with file input and output parameters
Again this is running on a server where I do wish process 1 file at a time in an automated fashion
Best regards,
Abraham Tom
____________________________
Abraham Tom
-----Original Message-----
From: Masanz, James J. [mailto:Masanz.James@mayo.edu]
Sent: Sunday, April 13, 2014 5:32 AM
To: 'dev@ctakes.apache.org'
Subject: RE: Command line invocation
Yes, that's possible.
You need more things on your classpath - you can take a look at the classpath within runctakesCVD.bat
Or if you are open to using groovy, take a look at the scripts directory within ctakes-core
-----Original Message-----
From: Abraham Tom [mailto:atom@practicefusion.com]
Sent: Saturday, April 12, 2014 10:55 AM
To: dev@ctakes.apache.org
Subject: Command line invocation
I am not a core java developer, I am a Hadoop data guy We are experimenting with using cTakes and we have no Java developers in house
I am trying to invoke ClinicalPipelineWithUmls on a server where I installed the developer cTakes. This invocation is done via the following command line
java -verbose -cp "/opt/cTAKES-3.1.1/ctakes-clinical-pipeline/target/classes;/home/mapr/.m2/repository/org/cleartk/cleartk-util/0.9.2/cleartk-util-0.9.2.jar" org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
but I am getting a Class not found error
I would like to invoke via command line so that I can wrap a shell script around it and automate the processing of various docs.
This should be possible shouldn't it?
Best regards,
Abraham Tom
RE: Command line invocation
Posted by "Masanz, James J." <Ma...@mayo.edu>.
Yes, that's possible.
You need more things on your classpath - you can take a look at the classpath within runctakesCVD.bat
Or if you are open to using groovy, take a look at the scripts directory within ctakes-core
-----Original Message-----
From: Abraham Tom [mailto:atom@practicefusion.com]
Sent: Saturday, April 12, 2014 10:55 AM
To: dev@ctakes.apache.org
Subject: Command line invocation
I am not a core java developer, I am a Hadoop data guy
We are experimenting with using cTakes and we have no Java developers in house
I am trying to invoke ClinicalPipelineWithUmls on a server where I installed the developer cTakes. This invocation is done via the following command line
java -verbose -cp "/opt/cTAKES-3.1.1/ctakes-clinical-pipeline/target/classes;/home/mapr/.m2/repository/org/cleartk/cleartk-util/0.9.2/cleartk-util-0.9.2.jar" org.apache.ctakes.clinicalpipeline.ClinicalPipelineWithUmls
but I am getting a Class not found error
I would like to invoke via command line so that I can wrap a shell script around it and automate the processing of various docs.
This should be possible shouldn't it?
Best regards,
Abraham Tom