Apache cTAKES™ is a natural language processing system for the extraction of information from electronic medical record clinical free-text. A web application providing REST API for cTAKES is available from the original repository. This is an extension of the REST API using Quarkus, (the Supersonic Subatomic Java Framework) designed for containers (docker).
04/10/2021: Updated with cTakes patch 4.0.0.1 for UmlsKey
- docker
- java 8
- maven
You can use a local or remote MySQL database. The SQL data scripts are available in this repo. Refer to the section titled 'SQL Data Scripts.' You can also spin up a docker container with these scripts as below (Yes, it has to be MySQL 5):
FROM mysql:5
COPY ./sno_rx_16ab_db/ /docker-entrypoint-initdb.d/
git clone https://github.com/dermatologist/quick-ctakes.git
Add the database details in customDictionary.xml in the resources folder. Make changes to the Default.piper if needed
cd quick-ctakes
./mvnw clean compile quarkus:dev
mvn clean package -DskipTests
- See the docker folder for details
docker build -f src/main/docker/Dockerfile.jvm -t <docker-user/container-name:tag .
- A sample docker-compose is also provided. (Add UMLS KEY HERE)
curl -X POST -H "Content-Type: text/plain" --data "this is hypertension and diabetes" 127.0.0.1:8080/analyze
This project uses Quarkus, the Supersonic Subatomic Java Framework.
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
You can run your application in dev mode that enables live coding using:
./mvnw quarkus:dev
The application is packageable using ./mvnw package
.
It produces the executable quick-ctakes-1.0.0-SNAPSHOT-runner.jar
file in /target
directory.
Be aware that it’s not an über-jar as the dependencies are copied into the target/lib
directory.
The application is now runnable using java -jar target/quick-ctakes-1.0.0-SNAPSHOT-runner.jar
.
You can create a native executable using: ./mvnw package -Pnative
.
Or you can use Docker to build the native executable using: ./mvnw package -Pnative -Dquarkus.native.container-build=true
.
You can then execute your binary: ./target/quick-ctakes-1.0.0-SNAPSHOT-runner
If you want to learn more about building native executables, please consult https://quarkus.io/guides/building-native-image-guide .