API providing canonicalization service.
NLTK data is needed. Just run ./get-nltk-data.sh
.
Run the following command to build the Docker image.
docker build -t canonicalization-server .
docker run -d -p 8080:80 --log-opt max-file=8 --log-opt max-size=8m --name canonicalization-server canonicalization-server
This will open an HTTP server on port 8080. Try the following for a demonstration.
curl -H "Content-Type: application/json" -X POST -d '{"text": "hound", "type": "object"}' localhost:8080/canonicalize