You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ctakes.apache.org by "Posada Aguilar, Jose David" <jo...@pitt.edu> on 2016/05/26 17:24:35 UTC

How to Produce a cTakes Executable in a server environment

Dear cTakes Community

Due to my use case I will need to run cTakes in a sever that cannot run any IDE.

I modified some portions of the source code and I will need to use all of the annotators inside the AggregatePlaintextFastUMLSProcessor.xml.

I have tried Maven build and also running the class files directly from console but any of those things seems to work.

What is the right way to do it?

Thank you in advance for all your help

Jose Posada
PhD Fellow
Biomedical Informatics Department
University of Pittsburgh




RE: How to Produce a cTakes Executable in a server environment

Posted by "Posada Aguilar, Jose David" <jo...@pitt.edu>.
Thank you Sean

I will try this approach and let you know as soon as possible if any unanticipated problem appears

Thank you very much

Jose

Get Outlook for Android<https://aka.ms/ghei36>



On Thu, May 26, 2016 at 11:36 AM -0700, "Finan, Sean" <Se...@childrens.harvard.edu>> wrote:

Hi Jose,

There are a lot of ways to do this, and there are examples laying about.  I think that you basically have a 3 step process:

1)  Run "mvn package" on the source to build the latest binary.

2)  Write a main(..) class that has something like:

    CollectionReader collectionReader = ------- your collection reader -------
    AnalysisEngine writer = -------- your cas consumer (db writer, stdout printer, xmi, etc.)
    AggregateBuilder aggregateBuilder = new AggregateBuilder();
    aggregateBuilder.add(ClinicalPipelineFactory.getFastPipeline());

SimplePipeline.runPipeline( collectionReader, aggregateBuilder.createAggregate(), writer );


3)  Run your main(..) with the ctakes lib and resources (etc) in the classpath.  Easiest way might be to copy ctakes-distribution/src/main/bin/runctakesCPE and change the line near the bottom where it executes java to point to your class.

I may have missed something, but that should just about do it.

Sean


-----Original Message-----
From: Posada Aguilar, Jose David [mailto:joseposada@pitt.edu]
Sent: Thursday, May 26, 2016 1:25 PM
To: dev@ctakes.apache.org
Subject: How to Produce a cTakes Executable in a server environment

Dear cTakes Community

Due to my use case I will need to run cTakes in a sever that cannot run any IDE.

I modified some portions of the source code and I will need to use all of the annotators inside the AggregatePlaintextFastUMLSProcessor.xml.

I have tried Maven build and also running the class files directly from console but any of those things seems to work.

What is the right way to do it?

Thank you in advance for all your help

Jose Posada
PhD Fellow
Biomedical Informatics Department
University of Pittsburgh




RE: How to Produce a cTakes Executable in a server environment

Posted by "Finan, Sean" <Se...@childrens.harvard.edu>.
Hi Jose,

There are a lot of ways to do this, and there are examples laying about.  I think that you basically have a 3 step process:

1)  Run "mvn package" on the source to build the latest binary.   

2)  Write a main(..) class that has something like:

    CollectionReader collectionReader = ------- your collection reader -------
    AnalysisEngine writer = -------- your cas consumer (db writer, stdout printer, xmi, etc.)
    AggregateBuilder aggregateBuilder = new AggregateBuilder();
    aggregateBuilder.add(ClinicalPipelineFactory.getFastPipeline());

SimplePipeline.runPipeline( collectionReader, aggregateBuilder.createAggregate(), writer );


3)  Run your main(..) with the ctakes lib and resources (etc) in the classpath.  Easiest way might be to copy ctakes-distribution/src/main/bin/runctakesCPE and change the line near the bottom where it executes java to point to your class.

I may have missed something, but that should just about do it.

Sean


-----Original Message-----
From: Posada Aguilar, Jose David [mailto:joseposada@pitt.edu] 
Sent: Thursday, May 26, 2016 1:25 PM
To: dev@ctakes.apache.org
Subject: How to Produce a cTakes Executable in a server environment

Dear cTakes Community

Due to my use case I will need to run cTakes in a sever that cannot run any IDE.

I modified some portions of the source code and I will need to use all of the annotators inside the AggregatePlaintextFastUMLSProcessor.xml.

I have tried Maven build and also running the class files directly from console but any of those things seems to work.

What is the right way to do it?

Thank you in advance for all your help

Jose Posada
PhD Fellow
Biomedical Informatics Department
University of Pittsburgh