The Alternative Tools For Sentiment Analysis
Tags: Sentiment Analysis, Text Mining, Nltk, Data Science, Vader

Sentiment Analysis is used to analyze the emotion of the Text, whether a whole document, paragraph, sentence or clause.

Sentiment Analysis aims to measures the attitude, sentiments, evaluations and emotions of the speaker/writer based on Computational treatment on the text. In simple words, using sentiment analysis we can detect whether the given sentence, paragraph or a document contain positive or negative emotion/opinion in it.

Why we use Sentiment Analysis? In Business for example, Marketing field company use it to understand customer feeling towards products, or brand, how people respond to their campaigns or products launches and why consumer don’t buy some products

Sentiment Analysis use Case

Customer nowadays is more open and abrupt in expressing their views about the products or the services they use, Sentiment Analysis tools become essential for company to know their customer better.

Challenges in Sentiment Analysis

Sentiment Analysis is a tricky subject, the Challenges here is that different people write their opinions in different ways, some people express their opinion straight while some may prefer adding sarcasm to their opinion. Also, some might have both positive and negative opinions.

For example: “This music is good but its lyrics could’ve been better”

In the above sentence, the opinion of a user is on both sides Positive and Negative.

VADER

VADER (Valence Aware Dictionary and sEntiment Reasoner) is a lexicon and rule-based sentiment analysis tool that is specifically attuned to sentiments expressed in social media. VADER is a model used for text sentiment analysis that is sensitive to both polarity (positive/negative) and intensity (strength) of emotion. It is available in the NLTK package or Standalone package and can be applied directly to unlabeled text data.

Advantages

Here are the advantages of using VADER which makes a lot of things easier:

It does not require any training data.

It can very well understand the sentiment of a text containing emoticons, slang, conjunctions, capital words, punctuation and much more.

It works excellent on social media text.

Let’s start The Coding

Before we start, we need to install the Vader first, in here we use vader that from NLTK package

import nltk

nltk.download('vader_lexicon')

from nltk.sentiment.vader import SentimentIntensityAnalyzer

SIA = SentimentIntensityAnalyzer()

SIA.polarity_scores("Sample Text")

VADER’s SentimentIntensityAnalyzer() takes in a string and method polarity_scores returns a dictionary of scores in each of four categories:

negative

neutral

positive

compound (computed by normalizing the scores above)

Let us analyze some random statements through our sentimental analyzer

Statement 1

Above text is 47.6% Positive, 0% Negative, 52.4% Neutral. While the compound score is 74.85%.

Statement 2

In this statement, with the use of smiley (emoji) in a sentence B, the positive score and compound score has increased.

Statement 3

Here we can see that with the use of capital word & exclamation mark, the positive score & compound score has increased.

The sentence C is more intense, positive and so the compound score of the sentence C is more.

The compound score will increase as the intensity of the text will increase towards positive.

The Compound score is a metric that calculates the sum of all the lexicon ratings which have been normalized between -1(most extreme negative) and +1 (most extreme positive).

* positive sentiment : (compound score >= 0.05)

* neutral sentiment : (compound score > -0.05) and (compound score < 0.05)

* negative sentiment : (compound score <= -0.05)

Conclusion

The results of VADER analysis don’t seem to be only remarkable but also very encouraging. The results show the advantages which will be attained by the utilization of VADER in cases of some marketplace or social media based industry, wherein the text data could be a complex mixture of a range of text.