Hi Ted, The implementation suggested by Peter is already available in https://github.com/GoTeamEpsilon/ctakes-rest-service/tree/master/ctakes-web-rest
Building this project will give you a WAR file which you need to deploy in Tomcat. Regards, Gandhi -----Original Message----- From: Peter Abramowitsch [mailto:[email protected]] Sent: Wednesday, June 13, 2018 2:40 AM To: [email protected] Subject: Re: Run cTAKES continuously Sorry, The mail sent before I was ready This is pseudocode // __aae is your analysis engine (there could be multiple) while(more notes) { jcas.setDocumentText(note.getFree_text()); _aae.process(jcas); // do something with the jcas contents here jcas.reset() } On Tue, Jun 12, 2018 at 11:06 PM, Peter Abramowitsch < [email protected]> wrote: > The best solution would be to put it in a server framework. I was not > able to get the EpsilonTeam server to work, but there's another tiny > server version written in Scala which you can try. I ended up doing one > using the > Spark REST framework. You can build a non server / non UI version which > does run at the command line by coding it up (in Java) to create the > pipeline or using a piper, then create a jCas which you > use/reset/reuse > > The core of it would be a loop like this > > jcas.setDocumentText(note.getFree_text()); > _aae.process(jcas); > > On Tue, Jun 12, 2018 at 8:05 PM, Ted Pikul <[email protected]> wrote: > >> Hi- I’ve been able to successfully run cTAKES from the command line >> as documented here: >> https://cwiki.apache.org/confluence/display/ctakes/default+ >> clinical+pipeline >> >> This works great, but each time it runs it has to make the database >> connection using jdbc and load the model, which takes 15 seconds or so. >> >> Is there another script besides the runClinicalPipeline.sh that I can >> run to just keep this running and send new notes to it rather than >> getting the db connection and loading the model each time? >> >> I know there is the cTAKES rest server project: >> https://github.com/GoTeamEpsilon/ctakes-rest-service which I think >> might do what I’m looking to do. but as it’s still in alpha stage, >> especially the docker piece of it, and I don’t really need a server I >> can just run from command line, I’m not sure this is the right >> solution for me. >> >> I tried looking at how the runctakesCVD.sh script works, as it does >> what I need but with the CVD UI, but I couldn’t quite figure it out >> from looking at the UIMA code. >> >> Any guidance here is greatly appreciated. Thank you >> > > This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender or system manager by email immediately if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited and against the law.
