Skip to content

choyiny/ctakes-server

 
 

Repository files navigation

Install

  • Download CTakes (e.g., follow ctakes user installation) to CTAKES_HOME.
  • Clone this repository, cd into it and run 'mvn package'.
  • To set up necessary resources, run the following:
ln -s $CTAKES_HOME/resources resources
ln -s $CTAKES_HOME/desc desc

Running Server

You can also start a simple REST Server with the following command (assuming you are in root dir):

java -Dctakes.umlsuser=<YOUR_UMLS_ID_HERE> -Dctakes.umlspw=<YOUR_UMLS_PASSSWORD_HERE> -Xmx5g -cp target/ctakes-server-0.1.jar:resources/ de.dfki.lt.ctakes.Server host(e.g. localhost) port(e.g. 9999) desc/path/to/desc.xml

You can then use the REST service via GET requests with parameters "text". E.g., in browser:

http://localhost:9999/ctakes?text=Pain in the left leg.

Running from Docker

  1. Clone this repository
https://github.com/choyiny/ctakes-server.git
  1. Create an .env file with the following information
HOST=0.0.0.0
PORT=9999
UMLSUSER=<YOUR UMLS USERNAME>
UMLSPW=<YOUR UMLS PASSWORD>
  1. Run docker compose on daemon mode
docker-compose up -d

YTex Install Notes

  • Follow YTex installation on ctakes website
    • you do not need to care about optional installation steps
  • requires Java-7

Recommendations

  • use desc/ctakes-ytex-uima/desc/analysis_engine/AggregatePlaintextUMLSProcessor.xml
  • comment assertion-node, because it requires a different scala version and is therefore not supported:
<!--node>AssertionAnnotator</node-->
  • exchange DictionaryLookupAnnotatorDB location to the following (because it works better):
<delegateAnalysisEngine key="DictionaryLookupAnnotatorDB">
    <!--import location="./DictionaryLookupAnnotator.xml" /-->
    <import location="../../../ctakes-dictionary-lookup-fast/desc/analysis_engine/UmlsLookupAnnotator.xml"/>
</delegateAnalysisEngine>

About

A simple REST-server around ctakes clinical pipeline.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages

  • Scala 80.2%
  • Dockerfile 19.8%