HTTP server for sentiment analysis of a piece of text.
542
Docker container for the Node.js sentiment library for analysing positive/negative affect in a string of text.
The container runs a HTTP server that accepts POST requests and responds with analysis results.
Run the container and publish port 8888.
$ docker run -p 8888:8888 anroots/sentiment
Send a HTTP POST request to the Docker container IP, port 8888. The text to be analysed must be sent in the text key.
curl --data "text=I%20am%20happy" http://localhost:8888
{"score":3,"comparative":1,"tokens":["i","am","happy"],"words":["happy"],"positive":["happy"],"negative":[]}
The Sentiment library is developed and licensed by @thisandagain. The Docker server in this repository is licensed under MIT.
Content type
Image
Digest
Size
180.1 MB
Last updated
over 10 years ago
docker pull anroots/sentiment