VADER (Valence Aware Dictionary and sentiment Reasoner) Sentiment Analysis

Swayanshu Shanti Pragnya
3 min readJan 16, 2022

--

Stock Market, people, painting, chairs, chart, chairman, wall, artwork [13]

Sentiment Analysis is the way of computationally determining whether a piece of writing is positive, negative, or neutral. It’s also referred to as information extraction because it involves assessing a presenter’s point of view or mindset [1].

Why is it so difficult to conduct a sentiment analysis [7]?

1. Sarcasm: Depending on the senders or situations, the words or text data implied in a sarcastic sentence have a different meaning. Sarcasm is when you say something that is the polar opposite of what you want to say.

2. Decoding — What is the sentence’s subject and object, and to whom does the verb or adjective relate?

3. Named Entity Recognition — What exactly is the person talking about?

4. Tweets -capital letters, misspelled words, punctuation, abbreviations, and grammatical structures.

How does sentiment analysis work?

Traditional methods involve dictionary or meaning-based analysis. But by using machine learning we can generate “features” from text to use these features to predict a “Label”

Example- splitting text à words à use these words to find their frequency by using the data visualization method (word-cloud) to classify sentiments

A typical sentiment analysis includes these steps,

Text input à Pre-process and Data cleaning

· Tokenization (word and sentences)

· Removing stop words

· Normalizing words (stemming and lemmatization)

· Text Vectorization

A basic workflow for sentiment classification looks like this:

  1. Splitting data into training and test data.
  2. Selecting a model architecture.
  3. Training the model with “training data”.
  4. Evaluating model’s performance using test data.
  5. Apply the trained model to new data to make predictions, which will be a number between -1.0 and 1.0 in this case.

VADER (Valence Aware Dictionary and sentiment Reasoner) Sentiment Analysis:

It is a lexical database and rule-based sentiment analysis tool that is optimized for social media sentiments. It makes use of a variety of techniques. A sentiment lexicon is a collection of lexical features (e.g., words) that are classified as positive or negative depending on their sentiment polarity. It not only exhibits the Positivity and Negativity scores, but also the degree to which a sentiment is positive or negative [1].

Command to install vaderSentiment [5] [6]:

pip install vaderSentiment

Please refer to [1] to understand the results obtained by vadersentiment and I followed this [11] article to implement vadersentiment using python:

check [6] for VADER to analyze Reviews.

Benefits of Using VADER [9] [10]:

  • It performs well on social media text while easily generalizing to diverse disciplines.
  • This approach is simple to understand for many implementations, such as evaluating public sentiment, performing a market analysis, or improving customer service.
  • It’s good at analyzing large datasets.

Disadvantages

  • It’s possible that prejudiced terminology, definitions, emoticons
  • Sarcasm
  • Due to misspelled words and grammar errors, the evaluation may miss important words

References:

[1] https://www.geeksforgeeks.org/python-sentiment-analysis-using-vader/

[2] https://realpython.com/sentiment-analysis-python/#machine-learning-tools

[3] https://www.mdpi.com/2076-3417/11/18/8438/htm

[4] https://github.com/cjhutto/vaderSentiment

[5] https://pypi.org/project/vaderSentiment/

[6] https://towardsdatascience.com/sentimental-analysis-using-vader-a3415fef7664#:~:text=VADER%20(%20Valence%20Aware%20Dictionary%20for,intensity%20(strength)%20of%20emotion.&text=The%20sentiment%20score%20of%20a,each%20word%20in%20the%20text.

[7] https://stackoverflow.com/questions/4806176/what-are-the-most-challenging-issues-in-sentiment-analysisopinion-mining

[8] Hutto, C.J., and Gilbert, E.E. (2014), titled “VADER: A Parsimonious Rule-based Model for Sentiment Analysis of Social Media Text,”

[9] https://www.codeproject.com/Articles/5269447/Pros-and-Cons-of-NLTK-Sentiment-Analysis-with-VADE

[10] https://medium.com/analytics-vidhya/simplifying-social-media-sentiment-analysis-using-vader-in-python-f9e6ec6fc52f

[11] https://www.thepythoncode.com/article/vaderSentiment-tool-to-extract-sentimental-values-in-texts-using-python

[12] https://sentence.yourdictionary.com/angry

[13] https://www.peakpx.com/en/hd-wallpaper-desktop-abvkw

--

--

Swayanshu Shanti Pragnya

M.S in CS Data Science and Bio-medicine(DSB)|Independant Researcher | Philosopher | Artist https://www.linkedin.com/in/swayanshu/