VaderSentiment¶
-
class
squirro.lib.nlp.steps.classifiers.
VaderSentiment
(config)¶ Bases:
squirro.lib.nlp.steps.classifiers.Classifier
Vader Sentiment Applies rule based sentiment analysis (positive, neutral, negative) on each document. The vader sentiment provides the polarity score of a text string, we take the compound score to detect sentiment. example output from vader analyzer: {‘neg’: 0.0, ‘neu’: 0.432, ‘pos’: 0.568, ‘compound’: 0.8476}
- Following strategy has been applied:
positive: compound score>=0.05 neutral: compound score between -0.05 and 0.05 negative: compound score<=-0.05
- Parameters
Methods Summary
process_doc
(doc)Process a document
Methods Documentation