5 Provides a REST-API to get the average sentiment of a given list of texts
6 The service uses the the sentiment analysis service indico.
8 `GET`: `/` Displays the expected input for a POST
10 `POST`: `/` Calculates the average sentiment for a given list of texts
11 - param: Term[] as Content-Tye: `application/json`
12 example body of request:
26 JSON string may contain more value-key pairs than 'text', but 'text' is needed for the sentiment analysis. Everything else will be ignored.
29 - `409`: input string does not meet specifications
30 - `503`: indico sentiment analysis not available
33 - `docker build -t sentiment_analysis .`
34 - `docker container run -d -p YOUR_PORT:8081 sentiment_analysis`
45 - `python3.7 sentiment_analysis.py`
46 - positive sentiment test example: `curl -vs -H 'content-type: application/json' -X POST http://localhost:8081 -d '[{"text":"happy birthday, i love you"}]'`
47 - negative sentiment test example: `curl -vs -H 'content-type: application/json' -X POST http://localhost:8081 -d '[{"text":"i hate you, please die"}]'`