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:josepos...@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



Reply via email to