Our service-based alternative to Coreference Resolution.
Python 3.6
Python <=3.6 don't support variable type hinting. The code relies on Python 3.6.x.
The docker container is using 3.6.1.
Install dependencies, best inside a virtual environment.
pip install -r requirements.txt
pip install uwsgi
This will start the service locally bound to 0.0.0.0:5128
.
uwsgi --ini uwsgi.ini
You must have a CoreNLP server running somewhere. You can configure it with the environmental variable PYCOBALT_CORENLP=http://localhost:9000
.
If you are not using our docker image which includes the required models, you must have the following models in the server's classpath:
- stanford-corenlp-models-current.jar
- stanford-english-corenlp-models-current.jar
- stanford-english-kbp-corenlp-models-current.jar
It is using CoreNLP version 3.7.0.
The service is wrapped in the docker-compose.yml
file which also includes an instance of CoreNLP.
docker-compose up
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"text": "Donald Trump is the president of USA. He is a business man."}' \
"http://localhost:5128/resolve/text"
Expected output:
{
"text": "Donald Trump is the president of USA. Donal Trump is a business man.",
}
- Andre Freitas
- Bernhard Bermeitinger
- Siegfried Handschuh