Sentiment Analysis

Find out what your customers, employees and partners are saying about you by analyzing social media channels, customer service data and emails with our sentiment analysis tools.

Sentiment Analysis

Why organizations need to implement sentiment analysis

Sentiment analysis enables organizations to get insights regarding their market reputation using data science. Instead of relying on cold calling, sending out feedback forms or conducting surveys by employing a huge field staff, companies can analyze what consumers think about their brand using text mining tools. This means that if your brand is getting a lot of criticism online, our tools will help you identify that in real time so that you can take appropriate actions and solve the issue before it becomes a major crisis.

“Sentiment analysis can help you avoid a PR disaster.”

The use of sentiment analysis is not just restricted to monitoring your brand reputation, it can also be used to keep track of how your new products are being perceived by consumers and monitoring how key influencers are reacting to them. Campaign monitoring across various online channels is also possible as is collecting intelligence on your competitors (by monitoring what consumers are saying about them).

Besides consumers, sentiment analysis can be deployed within the organization to find out the opinions and experiences of your employees, partners and suppliers. The text buried in emails, surveys, reports and customer service data can all be analyzed to identify trends within the company.

How sentiment analysis works

Sentiment analysis is also known as opinion mining. This is done using natural language processing, text analysis and computational linguistics. The process can be carried out with the use of multiple tools and programming languages.

Machine learning is at the heart of the sentiment analysis tools used by most organizations. This involves using an algorithm that analyzes the data points (tweets, comments and other text entries). The accuracy of your sentiment analysis depends upon which algorithm was used and the quantity and quality of your data. The more data that it has to analyze, the better its results will be.

Sentiment analysis for most businesses is about classifying the polarity of a given text in terms of positive, negative or neutral. To achieve this result, the sentiment analysis tool crawls all the social media sites where consumers have left their feedback and ratings. The text is gathered, filtered for errors, typos, articles and so on, leaving only the important words in the sentence for the tool to analyze. The tool then classifies the text into six emotional states – anger, disgust, fear, joy, sadness, surprise and the rest of the terms which the tool is unable to classify are labelled as unknown. After this the polarity of the comment is decided by classifying it as positive, negative or neutral.


Sentiment analysis of Twitter users – 11 Do’s and Don’ts

Sentiment analysis is the analysis of emotions, attitudes and opinions that are useful for making better business decisions.

Download Whitepaper

What to watch out for while building your sentiment analysis tool

A good sentiment analysis tool will be able to distinguish between the multiple and sometimes diametrically different opinions that people often express while evaluating something.

Here are three simple examples of two opinions in one sentence.

  • The food in the restaurant was excellent, but the service was horrible.
  • The only good thing about this movie was the lead actor.
  • This computer is ridiculously fast but my friend thinks it is not worth the price.

Some of the commonly used sentiment analysis tools will either classify the sentiment as either positive or negative, which is incorrect. Some will classify the sentiment as neutral on the logic that the positive and negative words cancel each other out, which is also incorrect. With longer blocks of text to analyze, the opinions can be even more difficult to sort out.

The correct way to analyze the sentences mentioned above is to view them as separate sentiments and score them accordingly. This involves building scoring algorithms or taking a set of sentiment tagged content and building a sentiment classifier.

Models built using natural language processing (NLP) can calculate the sentiment based on how the sentences have been composed. These models will be able to understand the grammar structure in sentences and how it affects the meaning of a sentence. For example, a review such as “This car is neither environment friendly, nor does it score high in safety ratings” will be classified as negative with a model that uses NLP. No model built so far has been 100% accurate, but with more practice (which means training it on more data), the accuracy rate can be increased.

Our sentiment analysis experiment

We ran a quick sentiment analysis experiment on the Twitter handles of three trending topics –

@BatmanvSuperman, which is the official Twitter page for the movie Batman v Superman: Dawn of Justice and the official Twitter pages of Donald Trump (@realDonaldTrump) and Hillary Clinton (@HillaryClinton), the two presidential hopefuls for the 2016 election.

Performing sentiment analysis on Twitter accounts is different from doing it on large blocks of plain text. This is because of the way the medium works. The short content (140 characters limit), slangs, hash tags, use of emoticons and abbreviations, all of this adds up to make the analysis a whole different ball game compared to long-form content.

To overcome these issues, we used a script written in R to analyze the opinions being expressed on these accounts and came up with these word clouds and polarity charts.

Interested in finding out your reputation in the market?

Our data scientists can build a sentiment analysis tool which shows you how your brand is perceived in the market.

Talk to Our Experts

Chart 1: @BatmanvSuperman emotional states


The reviews left by Twitter users on the movie’s page have been classified into one of the six emotions and the words that the script is unable to classify are added to the unknown category. “Lex Luthor” comes up in the fear category and Wonder Woman’s presence in the movie comes up in the surprise category since most movie viewers and critics saw that character’s role as a pleasant surprise. The size of the words in the cloud shows the popularity of the word which means that it has been mentioned a lot more compared to other words in the Twitter account.

Chart 2: @realDonaldTrump emotional states

@realDonaldTrump emtional states

Donald Trump’s cloud shows that his defeat in the Wisconsin primary is classified under surprise while the words “Canadian” and “Trudeau” (referring to Canadian PM Justin Trudeau) are classified under the fear category!

Chart 3: @realDonaldTrump polarity

@realDonaldTrump polarity

After the initial categorization of the tweets into one of the six states, the next step involves categorizing them into one of the polarities. As can be seen in the chart, in Trump’s account, the positive tweets far outweigh the negative and neutral tweets.

Chart 4: @HillaryClinton emtional states

@HillaryClinton emtional states

For Hillary Clinton, words such as “sick”, “fossilfuelsolution” and “taking” show up in the disgust category and are among the most popular terms on her Twitter account while words such as “diversity”, “trans”, “women’s”, “equality”, “respect”, “change” are categorized under joy which seems to be in line with the focus of her campaign so far.

Chart 5: @HillaryClinton polarity

@HillaryClinton polarity

The next step involves categorizing the tweets in one of the three polarities – negative, positive or neutral. As can be seen from the chart, an overwhelming majority of the tweets in Clinton’s account are classified under the positive category.

Chart 6: Trump vs Clinton

Trump vs Clinton

In this figure, we can see a comparison between Trump and Clinton’s account with respect to which words are the most popular ones. In Trump’s account, it is “trump” and “makeamericagreatagain”, and the other two popular words are surprisingly the names of his political rivals- “cruz” and “rubio”. In Clinton’s account, the most popular words are “hillary”, “gopdebate” and “demtownhall”.

A key fact to be kept in mind is that this particular chart just shows how often the word has been used and has nothing to do with the emotion or polarity of the words.

Let our data science team help you solve complex data and business problems