You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by Zuo Yiming <yi...@gmail.com> on 2016/12/07 19:44:41 UTC
How to use cTAKES from command line to process only one file instead
of all files in a directory?
Hi guys,
Is there any suggestion on using cTAKES to process one specific text file
from command line?
I was able to follow Tsung-Ting Kuo's post on stackoverflow as shown below
to apply cTAKES in a batch mode to process all files in a folder from
command line. But the initiation time and processing time are quite long,
and all I need is to process one file submitted from user's side. So I
think there should be something similar
to org.apache.uima.examples.cpe.SimpleRunCPE to process only one file using
cTAKES but get stuck and can't move on. Can anyone help me out?
Tsung-Ting Kuo's post on stackoverflow:
http://stackoverflow.com/questions/32939527/how-to-use-ctakes-from-the-command-line
Best,
Yiming
--
Yiming Zuo <https://sites.google.com/site/yimingzuo/>
Georgetown U. Medical Center:
Dr. Ressom's Omics Lab <http://omics.georgetown.edu/>
ECE Department of Virginia Tech:
Computational Bioinformatics & Bio-imaging Laboratory
<http://www.cbil.ece.vt.edu/>
RE: How to use cTAKES from command line to process only one file
instead of all files in a directory?
Posted by Tomasz Oliwa <ol...@uchicago.edu>.
There were some previous posts on this list about a cTAKES web demo, I think you can see it at http://healthnlp.github.io/examples/
Regards,
Tomasz
________________________________________
From: Zuo Yiming [yimingzuo@gmail.com]
Sent: Wednesday, December 07, 2016 2:29 PM
To: dev@ctakes.apache.org
Subject: Re: How to use cTAKES from command line to process only one file instead of all files in a directory?
Hi Tomasz,
Thanks for your suggestion. I'm running cTAKES under a windows server so I
guess the mktemp command may not be directly available to me. But I get the
idea.
What worries me most is the loading time of cTAKES. You mentioned running
cTAKES behind a web service. Do you mind talking more about it? Is it
possible to pre-load cTAKES on the server and only trigger it to process
the document when the user sends a request? I believe this will
significantly reduce the response time if successful.
Best,
Yiming
On Wed, Dec 7, 2016 at 3:15 PM, Tomasz Oliwa <ol...@uchicago.edu> wrote:
> Provided you are under Linux, you could just write a bash script that
> takes your input file as argument, creates a temporary directory with
> "mktemp -d", "cp" the file into it, and then runs a Java class that calls
> org.apache.uima.examples.cpe.SimpleRunCPE on this temporary directory.
>
> The init and class loading times will the same as before, as cTAKES needs
> to load its classes and models prior to any annotations. You might be more
> interested in running cTAKES behind a web service, but this depends on your
> use cases.
>
> Regards,
> Tomasz
>
> ________________________________________
> From: Zuo Yiming [yimingzuo@gmail.com]
> Sent: Wednesday, December 07, 2016 1:44 PM
> To: user@ctakes.apache.org; dev@ctakes.apache.org
> Subject: How to use cTAKES from command line to process only one file
> instead of all files in a directory?
>
> Hi guys,
>
> Is there any suggestion on using cTAKES to process one specific text file
> from command line?
>
> I was able to follow Tsung-Ting Kuo's post on stackoverflow as shown below
> to apply cTAKES in a batch mode to process all files in a folder from
> command line. But the initiation time and processing time are quite long,
> and all I need is to process one file submitted from user's side. So I
> think there should be something similar
> to org.apache.uima.examples.cpe.SimpleRunCPE to process only one file
> using
> cTAKES but get stuck and can't move on. Can anyone help me out?
>
> Tsung-Ting Kuo's post on stackoverflow:
> http://stackoverflow.com/questions/32939527/how-to-use-
> ctakes-from-the-command-line
>
> Best,
> Yiming
> --
> Yiming Zuo <https://sites.google.com/site/yimingzuo/>
> Georgetown U. Medical Center:
> Dr. Ressom's Omics Lab <http://omics.georgetown.edu/>
> ECE Department of Virginia Tech:
> Computational Bioinformatics & Bio-imaging Laboratory
> <http://www.cbil.ece.vt.edu/>
>
Re: How to use cTAKES from command line to process only one file
instead of all files in a directory?
Posted by Zuo Yiming <yi...@gmail.com>.
Hi Tomasz,
Thanks for your suggestion. I'm running cTAKES under a windows server so I
guess the mktemp command may not be directly available to me. But I get the
idea.
What worries me most is the loading time of cTAKES. You mentioned running
cTAKES behind a web service. Do you mind talking more about it? Is it
possible to pre-load cTAKES on the server and only trigger it to process
the document when the user sends a request? I believe this will
significantly reduce the response time if successful.
Best,
Yiming
On Wed, Dec 7, 2016 at 3:15 PM, Tomasz Oliwa <ol...@uchicago.edu> wrote:
> Provided you are under Linux, you could just write a bash script that
> takes your input file as argument, creates a temporary directory with
> "mktemp -d", "cp" the file into it, and then runs a Java class that calls
> org.apache.uima.examples.cpe.SimpleRunCPE on this temporary directory.
>
> The init and class loading times will the same as before, as cTAKES needs
> to load its classes and models prior to any annotations. You might be more
> interested in running cTAKES behind a web service, but this depends on your
> use cases.
>
> Regards,
> Tomasz
>
> ________________________________________
> From: Zuo Yiming [yimingzuo@gmail.com]
> Sent: Wednesday, December 07, 2016 1:44 PM
> To: user@ctakes.apache.org; dev@ctakes.apache.org
> Subject: How to use cTAKES from command line to process only one file
> instead of all files in a directory?
>
> Hi guys,
>
> Is there any suggestion on using cTAKES to process one specific text file
> from command line?
>
> I was able to follow Tsung-Ting Kuo's post on stackoverflow as shown below
> to apply cTAKES in a batch mode to process all files in a folder from
> command line. But the initiation time and processing time are quite long,
> and all I need is to process one file submitted from user's side. So I
> think there should be something similar
> to org.apache.uima.examples.cpe.SimpleRunCPE to process only one file
> using
> cTAKES but get stuck and can't move on. Can anyone help me out?
>
> Tsung-Ting Kuo's post on stackoverflow:
> http://stackoverflow.com/questions/32939527/how-to-use-
> ctakes-from-the-command-line
>
> Best,
> Yiming
> --
> Yiming Zuo <https://sites.google.com/site/yimingzuo/>
> Georgetown U. Medical Center:
> Dr. Ressom's Omics Lab <http://omics.georgetown.edu/>
> ECE Department of Virginia Tech:
> Computational Bioinformatics & Bio-imaging Laboratory
> <http://www.cbil.ece.vt.edu/>
>
RE: How to use cTAKES from command line to process only one file
instead of all files in a directory?
Posted by Tomasz Oliwa <ol...@uchicago.edu>.
Provided you are under Linux, you could just write a bash script that takes your input file as argument, creates a temporary directory with "mktemp -d", "cp" the file into it, and then runs a Java class that calls org.apache.uima.examples.cpe.SimpleRunCPE on this temporary directory.
The init and class loading times will the same as before, as cTAKES needs to load its classes and models prior to any annotations. You might be more interested in running cTAKES behind a web service, but this depends on your use cases.
Regards,
Tomasz
________________________________________
From: Zuo Yiming [yimingzuo@gmail.com]
Sent: Wednesday, December 07, 2016 1:44 PM
To: user@ctakes.apache.org; dev@ctakes.apache.org
Subject: How to use cTAKES from command line to process only one file instead of all files in a directory?
Hi guys,
Is there any suggestion on using cTAKES to process one specific text file
from command line?
I was able to follow Tsung-Ting Kuo's post on stackoverflow as shown below
to apply cTAKES in a batch mode to process all files in a folder from
command line. But the initiation time and processing time are quite long,
and all I need is to process one file submitted from user's side. So I
think there should be something similar
to org.apache.uima.examples.cpe.SimpleRunCPE to process only one file using
cTAKES but get stuck and can't move on. Can anyone help me out?
Tsung-Ting Kuo's post on stackoverflow:
http://stackoverflow.com/questions/32939527/how-to-use-ctakes-from-the-command-line
Best,
Yiming
--
Yiming Zuo <https://sites.google.com/site/yimingzuo/>
Georgetown U. Medical Center:
Dr. Ressom's Omics Lab <http://omics.georgetown.edu/>
ECE Department of Virginia Tech:
Computational Bioinformatics & Bio-imaging Laboratory
<http://www.cbil.ece.vt.edu/>