Skip to content

harena-incubator/harena-semantics

Repository files navigation

Harena Semantics

A module to manage Semantic Clinical Cases. Visit Harena: https://github.com/harena-lab.

Getting Started

We provide a docker container to locally run harena-semantics code. Containers guarantee the required minimal configuration to run the code. Read docker e docker-compose documentations to install docker and learn further about containers.

In order to execute docker without sudo, read this link: https://docs.docker.com/engine/install/linux-postinstall/, which shows another optional and valuable configurations in docker environment.

Instructions (for Linux users)

Clone harena-semantics repository, get into it, checkout master branch, and build the Semantics docker image:

git clone https://github.com/datasci4health-incubator/harena-semantics.git
cd harena-semantics
git pull origin master

docker build . -t semantics

Start up the docker container:

docker-compose -f docker-compose-dev.yml up

The start up process will be successfully done when the terminal displays the message:

Downloading: 100%|██████████| 431M/431M [08:53<00:00, 808kB/s]
harena-semantics |  * Serving Flask app (lazy loading)

Once the process is done, you can access http://localhost:10040/ to check if the system is properly working.

If you want to get the command line of the container, then run the command:

docker exec -it harena-semantics bash

Available Services

  • POST /ner/bert: Annotates the input text with named entities recognized through a BERT-based neural network.
  • POST /ner/ncbo: Annotates the input text with ontology concepts recognized via the NCBO Annotator service.