Sentiment Analysis Explained & Tutorial with Social Data

Sentiment analysis is the AI evaluation of text to determine if the emotions expressed are positive, negative, or neutral. Sentiment data analysis can be applied to social media conversations, online reviews, emails, and surveys – anywhere customers are leaving their opinions. 

Sentiment data analysis tools can read entire documents, paragraphs, short phrases, and individual words for polarity (negative to positive sentiment) and beyond, for emotions, like “angry,” “sad,” and “happy.” Companies can gain useful insights from this data to learn what they’re doing right and what they need to work on. But it’s far too much data for humans to process alone.

For social media monitoring, machine learning techniques like sentiment classification can be particularly useful. There are approximately 6,000 tweets sent every second. Imagine having access to all that data and the ability to analyze it in real time. AI and machine learning programs allow you to scour Twitter for mentions specific to your company and find out exactly how users feel about your brand in minutes. Something that would otherwise take dozens of employees and countless hours to achieve.

Read on to learn how you can put machine learning models to work to mine your data for sentiment. Understanding your public’s emotions is key to building and strengthening your customer experience.

Where to Get Your Data

The interconnectivity of the modern age means there are huge amounts of data created every day, most of it right at your fingertips. Sentiment data analysis makes it easy to get insights to drive your company strategy. The data’s out there, you just need to know where to look:

Social media

Performing sentiment analysis on social media data can prove to be particularly fruitful. There could be dozens of conversations happening about your brand on social media right now. Keeping an eye on Twitter using sentiment analysis tools, for example, will help you understand your customers, your competitors, and industry trends. 

Imagine your company releases a new product and you see a sudden uptick in tweets about your company. 

Good, right? 

Well, it’s not just the quantity of tweets, it’s the quality that matters. You need to know if these tweets are positive or negative. What are the users feeling? With sentiment data analysis you can analyze your tweets in just minutes to provide solid, actionable information about your customers’ feelings and your overall brand sentiment – in real time and on an on-going basis.

Customer service

Use sentiment data analysis to automatically classify and organize your customer service tickets through live chats, call centers, and help desks. Customer service can often be as important as the actual products and services you sell. No one wants to be put on hold or left waiting online – especially when they’re already unhappy. 

With text and voice analysis, you can prioritize your customer chats to handle the most important issues first. Quickly detect dissatisfied customers, bring their queries to the top, and automatically assign those tickets to the proper region, department, or individual team member. 

You can even analyze and follow your customer service success on a regular basis.


Some companies receive thousands of emails a day. If your customer service department merely tries to go through them in order of receipt, you may be passing over urgent matters and important insights.

Email 1

“Thanks for my order. It arrived on time, but I never got a receipt. Please forward it over.”

Email 2

“I received my software package today. I think it’s all there, but my authorization code doesn’t seem to be working.”

Both of the above are examples of customer problems, but the second is clearly the most pressing. Not only that, but it’s likely an issue that could be dealt with in a matter of minutes to retain a happy customer. However, if it weren’t addressed for a number of hours, it may only anger this customer, possibly losing your hard-won business.

You can also use sentiment data analysis to read emails to track overall customer state-of-mind. If the percentage of disgruntled customers suddenly goes up, you’ll know right away, with plenty of time to do something about it.

Customer feedback

Gather feedback from online reviews and customer surveys for market research. You can create internal surveys to ask only the questions you want answered, and have the data packaged up nicely in no time.

On the other hand, feedback from review sites, social media platforms, and blog entries sometimes provides the truest opinions. Unsolicited opinions are often where pure admiration or distaste for a product or company is expressed, when customers feel compelled to voice their opinion for others to see. Imagine how long it would take to scour the entire internet for this kind of information. Sentiment data analysis programs can do it efficiently and cost-effectively. 

Sentiment Analysis Tutorial: Breaking Down Big Data

Now that you’ve collected your data, there are different tools you can use to perform sentiment analysis. 

You can create models from scratch, using open-source libraries. This is a great option for experienced coders or companies with teams of engineers, but it may require quite a lot of work on the back end.

SaaS tools, on the other hand, are easier and faster to set up and completely user friendly. MonkeyLearn offers a variety of text analysis tools, many with no coding required, including a pre-trained sentiment analysis model. You can simply paste text and have it analyzed right away.

If you want an SaaS model that’s more thoroughly trained for your business and your industry, you can easily create your own sentiment analysis model and train it yourself. Sign-up for a free MonkeyLearn account, and follow along below. It’s easy. 

  1. Choose your model

Go to your MonkeyLearn dashboard and click ‘Create a model’ in the right-hand corner, then choose ‘Classifier,’:

  1. Choose your classifier

We want to detect emotions in customer opinions, so click on ‘Sentiment Analysis’:

  1. Import your data

Import your data from an app or upload a CSV or Excel file. This will be used to train your sentiment analysis model. In this example, we’re going to import data directly from Twitter. 

Enter a search query for tweets you’d like to use to train your model. It can be a keyword, hashtag, or brand mention. For this tutorial, we’ll use the keyword ‘Zoom.’ Next, choose the column you’d like to import data from (generally the text of the tweet):

  1. Tag tweets to train your sentiment analysis classifier

Tag each tweet as Positive, Negative, or Neutral to train your model based on opinion polarity. The model will begin making its own predictions after you tag a few tweets. You can correct them, if the model has tagged incorrectly:

  1. Test your classifier

When you’ve trained your model with some examples, you can paste your own text to see how the sentiment is classified:

MonkeyLearn displays a number of statistics to deliver a sentiment score, and the keyword cloud visualizes frequently used terms for each sentiment.

If your scores are low, or you notice that your model isn’t correctly tagging texts, you may need to tag more tweets to train your model. The example below shows that more tags are required for the tag Negative.

The more training you do, the more accurate your sentiment analysis model becomes.

  1. Make your model work on a large scale

Once your model is suitably trained, you’re ready to upload massive amounts of Twitter data all at once. With MonkeyLearn you can use any or all three of the below:

Batch Analysis: upload a CSV or Excel file with new tweets. MonkeyLearn will process the data and provide a new file with sentiment results.

Integrations: MonkeyLearn offers simple integrations with apps you probably already use:

API: easy programming for quick plug-in analysis:


Sentiment data analysis can be an extremely helpful tool to evaluate how the public feels about any business. Automated analysis of social media, email, and customer feedback data can save hundreds of employee hours and provide more consistent and accurate results. 

There are a number of avenues you can take to gather your data. A proactive approach can keep your company ahead of the trends. Constant customer opinion monitoring will help you stay in direct contact. 

Sign up for MonkeyLearn and get started right away with advanced sentiment analysis software. It’s free and easy to use.

Rachel Wolff

Rachel Wolff

BA in journalism and French from Sheffield University. Interested in human-machine collaboration and Google's ever-changing algorithms.


Have something to say?

Text Analysis with Machine Learning

Turn tweets, emails, documents, webpages and more into actionable data. Automate
business processes and save hours of manual data processing.