/sentiment-webapp

A sentiment and named entity highlighter webapp in Django.

Primary LanguagePython

Sentiment and Named Entity Highlighter

A web application in Python Django that highlights:

  1. Sentiments (Positive/Negative/Neutral) at the sentence level
  2. Named Entities (Organization/Person/Location)

The backend for the named entity is Stanford NER. For sentiment analysis, 4 models have been used:

  1. TextBlob Lexicon (based on Pattern)
  2. TextBlob Naive Bayes (based on NLTK)
  3. NLTK Vader
  4. Stanford Core NLP Deep Learning

Requirements

Python packages: textblob, nltk, ner Download and extract the CoreNLP Jar files for Sentiment and for NER

Running

Two servers need to be running in the background for CoreNLP to function.

cd stanford-english-corenlp-2016-10-31-models/ 
java -mx5g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer 
cd stanford-ner-2015-12-09 
java -mx1000m -cp "stanford-ner.jar:lib/*" edu.stanford.nlp.ie.NERServer -loadClassifier classifiers/english.all.3class.distsim.crf.ser.gz -port 9191 

Once this is done, start the django app by executing the following commands:

cd sentimentapp/
python manage.py runserver