View Source Needlepoint.Sentiment.Vader (Needlepoint v0.1.0)
An imeplemntation of VADER rule based sentiment analysis, based on the NLTK port.
Hutto, C.J. & Gilbert, E.E. (2014). VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text. Eighth International Conference on Weblogs and Social Media (ICWSM-14). Ann Arbor, MI, June 2014.
Link to this section Summary
Functions
Return a float for sentiment strength based on the input text. Positive values are positive valence, negative value are negative valence.
Link to this section Functions
@spec polarity_scores(String.t()) :: %{ compound: float(), neg: float(), neu: float(), pos: float() }
Return a float for sentiment strength based on the input text. Positive values are positive valence, negative value are negative valence.
examples
Examples
iex> Vader.polarity_scores("Shut the hell up!")
%{compound: -0.7088, neg: 0.62, neu: 0.38, pos: 0.0}
iex> Vader.polarity_scores("Yes, please.")
%{compound: 0.6124, neg: 0.0, neu: 0.0, pos: 1.0}