No description, website, or topics provided.
Branch: master
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
sentiment-analysis-repo Content extraction Jan 29, 2019
sentiment-analysis-share Alfresco artifacts Jan 29, 2019
sentiment-analysis Fix to work only with available API as we have removed an API Feb 11, 2019
.gitignore Correct the sample URL Jan 29, 2019


This project was created as part of Alfresco #DevCon2019 and aims to create a micro service that is able to analyise the sentiment of a content. As part of this project we will compare the different NLP frameworks and try to improve on the accuracy of the prediction.


  • Project setup.
  • Data preparation.
  • NLP Sentiment Analysis interface.
  • StandfordNLP implementation.
  • OpenNLP implementation.
  • SpringBoot setup to expose Rest-API endpoints
  • Unit test.

Stretch Tasks

  • Integrate the service into Alfresco, create a rule that invokes the Sentiment Analysis API.
  • Integrate with APS to perform a process based on the Sentiment result.


Change into the sentiment-analysis folder and perform the following:

Building The Application

mvn clean install

Running The Application

java -jar target/sentiment-analysis-1.0.0.jar To view the page: http://localhost:8080/

Docker Build

docker build -t SentimentAnalysis .

Running with Docker

docker run SentimentAnalysis To view the page: http://localhost:8080/


Get Sentiment Analysis ranking by sentence


$ curl -X POST \
  http://localhost:8080/analyze/v1/text \
  -H 'Content-Type: text/plain' \
  -d Text coming from Alfresco Content


    "ranking": {
        "positive": 3,
        "negative": 4,
        "neutral": 3