ctakes-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samir chabou <samir...@yahoo.com.INVALID>
Subject Re: iterate on the features of CAS consumer (FileWriterCasConsumer)
Date Thu, 16 Apr 2015 02:56:41 GMT
Hi Tim,I was able to use CasIOUtil package to iterate on the Cas features. First, I need it
to create a new Cas and I used JCasFactory for that. Below is the two lines of code. Thanks
for your help

JCas jcas = JCasFactory.createJCas(); //create a new case CasIOUtil.readJCas(jcas, new File("C:\\temp\\uima\\xcas\\xCasAbstrct.xcas"));
//load the existing Cas into the new one
Samir


     On Wednesday, April 15, 2015 2:53 PM, samir chabou <samirchb@yahoo.com> wrote:
   

 Thanks Tim for your suggestion I'll try to experiment with the CasIOUtil method and keep the
uesr/dev list posted.   


     On Wednesday, April 15, 2015 7:07 AM, "Miller, Timothy" <Timothy.Miller@childrens.harvard.edu>
wrote:
   

 The standard way that we do save redundant processing time is by writing the CAS for each
file to an XMI file after one pass on the data which runs all the analysis engines.

For example, if we are working on experiments, we have one pipeline that does all the NLP
feature generation (POS tags, dependency parsing, dictionary lookup, etc.), and writes each
document to an xmi file in a directory using UimaFit's CasIOUtil class:
https://uima.apache.org/d/uimafit-current/api/org/apache/uima/fit/util/CasIOUtil.html

Then in a second machine learning pipeline we read the xmi files (using a different CasIOUtil
method) and vary any machine learning parameters we want using the same standard annotations.

Hope this helps.
Tim

________________________________________
From: samir chabou [samirchb@yahoo.com.INVALID]
Sent: Monday, April 13, 2015 11:22 PM
To: dev@ctakes.apache.org; user@ctakes.apache.org
Subject: Re: iterate on the features of CAS consumer (FileWriterCasConsumer)

  Hi,how can I load an existing FileWriterCasConsumer in a java code and iterate through
the features in the FileWriterCasConsumer ?
Note: i was able to load the clinical pipeline in my java code and create a new jCas and process
it; the problem with this is each time i ran the java code i have to reload the clinical pipeline
which take a bit of time.
please advise Thanks


    On Saturday, April 11, 2015 12:54 AM, samir chabou <samirchb@yahoo.com> wrote:


  Hi,how can I load an existing FileWriterCasConsumer in a java code and iterate through
the features in the FileWriterCasConsumer ?
Note: i was able to load the clinical pipeline in my java code and create a new jCas and process
it; the problem with this is each time i ran the java code i have to reload the clinical pipeline
which take a bit of time.
Thanks



   

  
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message