Guide to Aspect-Based Sentiment Analysis

Guide to Aspect-Based Sentiment Analysis

If you thought sentiment analysis was pretty neat, then prepare to be blown away by an even more advanced text analysis technique: aspect-based sentiment analysis.

This technique, also known as aspect-level sentiment analysis, feature-based sentiment analysis, or simply, aspect sentiment analysis, allows businesses to perform a detailed analysis of their customer feedback data, so they can learn more about their customers and create products and services that meet their needs.

Below, learn more about what aspect sentiment analysis is, how it works, and what it can do for your business. Then, follow our aspect-based sentiment analysis tutorial to create your own custom model – no coding necessary!

  1. What Is Aspect-Based Sentiment Analysis?
  2. Why Is Aspect-Based Sentiment Analysis Important?
  3. How To do Aspect-Based Sentiment Analysis?
  4. Aspect-Based Sentiment Analysis Use Cases & Applications

What Is Aspect-Based Sentiment Analysis?

When we talk about aspects, we mean the attributes or components of a product or service e.g. “the user experience of a new product,” “the response time for a query or complaint,” or “the ease of integration of new software.”

Here’s a breakdown of what aspect-based sentiment analysis can extract:

  • Sentiments: positive or negative opinions about a particular aspect
  • Aspects: the category, feature, or topic that is being talked about

Why Is Aspect-Based Sentiment Analysis Important?

Aspect sentiment analysis is important because it can help companies automatically sort and analyze customer data, automate processes like customer support tasks, and gain powerful insights on the go.

Customers are more vocal than ever. They enjoy engaging with brands and leaving feedback – good and bad. Each time customers interact with a brand, whether it’s a mention or comment, they are leaving a wealth of insights that let businesses know what they’re doing right and wrong.

But it can be difficult wading through all this information by hand. Instead, aspect-based sentiment analysis does the hard work for you.

Aspect-Based Sentiment Analysis Is Scalable

It’s impossible for teams to manually sift through thousands of tweets, customer support conversations, or customer reviews – especially if they want to analyze information on a granular level. Aspect-based sentiment analysis allows businesses to automatically analyze massive amounts of data in detail, which saves money, time, and means teams can focus on more important tasks.

Perform Real-Time Analysis

Aspect-based sentiment analysis allows businesses to hone in on aspects of a product or service that customers are complaining about and fix them in real-time. Is there a glitch in an app? Is there a major bug in some new software? Are customers getting angry about one particular service or product feature? Feature-based sentiment analysis can help you immediately identify these kinds of situations and take action.

Get Consistent Criteria

While humans are able to differentiate between aspects and sentiments within a text, we’re not always objective. We’re influenced by our personal experiences, thoughts, and beliefs and only agree around 60-65% of the times when determining sentiments for pieces of text. By using a centralized aspect analysis model, businesses can apply the same criteria to all texts meaning results will be more consistent and accurate.

Understand Customers on a Deeper Level

It’s easier to scan and categorize text as positive or negative than it is to spend time analyzing each sentence of a text. But by using an automated aspect-based sentiment analysis system, companies can gain a deeper understanding of specific products and services quickly and easily, and really focus on their customers’ needs and expectations. It means businesses take into account everything a customer says and can create a customer-centric experience.

How to do Aspect-Based Sentiment Analysis

1. Gather data

Before we can start any kind of text analysis, we need to gather information. But where does all the data come from and how can businesses gather it? Below are aspect-based sentiment analysis examples and the data you can dig into:

Internal Data

Businesses have been collecting colossal amounts of data for years but have only just started to realize the power of all this data.

  • Surveys

Running aspect-based sentiment analysis on surveys can gather huge insights for any company. Online survey tools, like SurveyMonkey and Typeform make creating and sending surveys easy, and integrations with text analysis tools can automate the process.

Open-ended questions, for example, can reveal what a customer thinks about different aspects of the user experience: “simple to use and easy user interface (positive), although there are constant bugs (negative)”.

Many companies use NPS software, like Delighted, Promoter.io, and Satismeter, to collect and analyze feedback from their customers. Using an aspect-based sentiment analysis model, you’ll be able to sort data automatically and gain insights about specific aspects or features of your product or service.

  • Customer Service and Customer Relationship Management (CRM) Software

This is the software businesses use to communicate with customers; for example Zendesk, Freshdesk, and Help Scout. They’re full of unstructured data – just think about all the queries you deal with, all from different channels.

That’s a lot of useful information that can be classified with an aspect-based sentiment analysis model, whether to quickly identify aspects of a product or service your customers are unhappy with, or direct specific problems to the correct customer service team.

External Data

The web is full of external information from social media, news articles, product reviews, etc. And more and more companies are making their datasets public, as well as combining both internal and external data sources to optimize their business processes and influence key business decisions. Text analysis models, like aspect-based sentiment analysis, are key to handling large amounts of public data because they’re able to automatically interpret data easily and quickly at a granular level and help businesses solve problems. But how do you find and collect relevant data from different websites?

  • Web Scraping Tools

Web scraping tools, or web data extraction tools, are essential when it comes to collecting external data.

Visual Web Scraping Tools (for non-coders): You can build a visual web scraping tool without entering a single line of code. We recommend Dexi.io, Portia, and ParseHub as a starting point.

Web Scraping Frameworks (for coders): Create your own scraper using various powerful, open-source frameworks. We recommend Scrapy, perfect for aspect-based sentiment analysis in Python, or Wombat, written in Ruby.

  • APIs

These allow applications to communicate with another. So if you want to extract useful data from websites or social media platforms, you can connect them with an API. Large companies like Facebook, Twitter, and Instagram have their own APIs and allow you to extract data from their platforms, so you can gather comments from social media platforms about specific product features using aspect-based analysis.

2. Perform Aspect-Based Sentiment Analysis

Now that you know how to gather data, we’re going to teach you how to create your own models – both sentiment and aspect models – to tag and classify the information that is most relevant to your business. With MonkeyLearn, you can build your own no-code, custom models. Our platform is super simple to use and perfect for anyone who’s new to machine learning, as well as for those who like to dabble in code. Read on for your aspect-based sentiment analysis tutorial.

Aspect-Based Sentiment Analysis Tutorial

  1. Preprocess Data With Opinion Units

Because individual comments may contain multiple opinions, we need to break them up into “opinion units” before analysis.

For example, "I love Slack UX but I wish the pricing was more accessible to small startups."

Here, we have multiple aspects and sentiments. A perfect opportunity to use your aspect-based model.

"I love Slack UX" – this opinion unit is 'Positive'' (sentiment) and is about 'UX' (aspect)

"but I wish the pricing was more accessible to small startups" – this opinion unit is 'Negative' (sentiment) and is about 'Pricing' (aspect)

Machine models that have been trained to detect opinion units are much more precise when it comes to analyzing data. Why? Well, it’s a lot easier for a machine to understand a sentence with one sentiment, than it is to understand a sentence containing multiple sentiments.

Try out MonkeyLearn’s pre-trained opinion unit extractor to see how it works:

Opinion unit extractor separating the comment, 'I love Slack UX, but I wish the pricing was more accessible to small startups.' into two opinion units.

It’s time for you to have a go at creating your machine learning models. Follow our step-by-step tutorial below on how to build sentiment and aspect models. Once you’ve finished, you’ll be able to test them and put them to work on your own data.

  1. Create a Sentiment Analysis Model

Go to your dashboard and click on 'Create Model' then choose 'Classifier':

The option to choose a Classifier or Extractor model.

Choose 'Sentiment Analysis' from the list:

The option to choose Topic Classification, Sentiment Analysis, or Intent Classification.

Upload data from CSV or Excel files, or borrow something from our data library:

The option to choose a CSV or Excel file or download one from the data library.

Start training your model by using the predefined tags (positive, neutral, negative) and tagging texts manually. Just assign the appropriate tag to each piece of text, like in the example below:

Training the sentiment analysis model by tagging text "positive," "negative," or "neutral."

Around four samples per tag are needed for your model to have a very basic understanding of the information it needs to classify. Having said this, the more time you spend training it and the more data you tag, the more accurate your model will be. Notice that some examples are already tagged? That’s machine learning at work!

Test your sentiment analysis model once you’ve finished tagging your text data. Just go to the 'Run' tab, enter new text, and see how your text analysis model analyzes and classifies the text:

Entering new text to test the sentiment analysis model.

If you’re happy with the results of the analysis, your model is ready to go!

MonkeyLearn gives you the flexibility of uploading your data in various formats. Upload CSV and Excel files or use one of our integrations:

MonkeyLearn integrations: Zapier, Sheets, Rapidminer, Zendesk, and more.

Or, if you’re a master of code then use MonkeyLearn’s API Or, if you’re a master of code then use MonkeyLearn’s API to import data to your model. You can do your aspect-based sentiment analysis in Python, Curl, Ruby, PHP, Javascript, and Java.

Using the sentiment classifier with MonkeyLearn's API code in Python.

In this guide, you can learn more about how sentiment analysis works, including different methods and algorithms used to implement systems, as well as metrics used to evaluate the performance of classification models.

  1. Create an Aspect or Topic Classifier:

Creating an aspect-based model is similar to creating a sentiment model. The only difference is that when you create an aspect-based model, you’ll need to define a set of tags, when prompted, which are relevant to your business, for example ‘for example ‘Accounts’, ‘Performance’, ‘Updates’:

defining tags for the aspect classifier

You’ll need around four text samples per tag, before your model starts learning by itself. Remember, the more you train your model, the better it will be at extracting aspects within a text.

Start training your model by using the tags you previously defined (performance, updates, accounts) and tagging texts manually.

Adding tags, "Performance," "Updates," Accounts," etc.

Test your aspect-based model to see if your text classifier can work autonomously! You’ll need to go to the ‘Run’ tab and enter new text samples to see if your model can accurately analyze the given text. If your model is tagging aspects accurately, then you know it’s working!

Entering new text to test the aspect-based model.

Want to carry on training your model, or check to see if your model’s working? Simply import your data-packed CSV and Excel files or use one of our integrations. If you’re familiar with Python, Ruby, PHP, Javascript, or Java, you might want to use MonkeyLearn’s API to run your model and import data:

An example of MonkeyLearn API code in Python.

3. Visualize Aspect-Based Sentiment Analysis Results

Data visualization tools allow you to display your results in convincing, striking detail. Let’s take a look some top tools:

  • MonkeyLearn Studio

MonkeyLearn Studio is an all-in-one data gathering, text analysis, and data visualization tool. Below is a MonkeyLearn Studio aspect sentiment analysis example of online reviews of Zoom.

The MonkeyLearn Studio dashboard showing multiple text analysis results together.

The reviews are aspect-analyzed by Usability, Pricing, Support, etc., then sentiment analyzed so we understand which aspects are positive and which are negative. MonkeyLearn Studio allows you to bring all of your analyses together, in a single, easy-to-use dashboard.

Play around with the MonkeyLearn Studio public dashboard and see how it works. Change criteria for a broad overview or super fine-grained results: change data by category, intent, date, etc.

MonkeyLearn is a low-to-no-code option that integrates easily with applications you already use, like Excel and Google Sheets, Zendesk, Zapier, SurveyMonkey, and more.

  • Google Data Studio

Google Data Studio is Google’s free and easy-to-use visualization tool allows you to create engaging reports by connecting and importing your data. The great thing about Google Data Studio is that you can easily share results, so that everyone in your team has access to valuable insights.

  • Looker

Looker Looker is a business data analytics platform that allows teams to keep on top of what’s happening in their company, in real-time. Once you’ve connected it to different data sources and customized it to your business’ needs, you’ll be able to see your visual data in real-time.

  • Tableau

Tableau is a business intelligence tool helps people understand and visualize data. It’s easy to use and allows organizations to import data from almost any source. The Tableau suite offers products for both developers and beginners.

Apsect-Based Sentiment Analysis Use Cases and Applications

Aspect-based sentiment analysis is a very versatile text analysis model that can be used across all industries and internal departments to automate business processes, gain powerful and more accurate insights, and make data-driven decisions. Let’s take a look at some of the ways in which aspect-based sentiment analysis is being used in business:

In this section, we’re going to focus on how aspect-based sentiment analysis is being used to analyze customer feedback (VoC) and improve customer service.

Fine-Grained Product Feedback Analysis

There are huge amounts of feedback available from NPS and other surveys, on social media, online reviews, and much more. All this textual customer feedback is key to discovering and solving customer problems.

Here’s how aspect-based sentiment analysis can be used to make sense of all this customer feedback:

  • Understand specific aspects that customers like and dislike about your brand.
  • Get valuable, granular-level insights from customer feedback.
  • Analyze service and product reviews to discover the successes and failures of your brand, and compare them to your competitor’s.
  • Track how customer sentiment changes toward specific features and attributes of a service or product.
  • Determine if customer segments feel more strongly about a specific feature, for example an older demographic might find a travel website harder to navigate than a younger demographic.

Automating Customer Support Tasks

Customers don’t like waiting for a solution to their problems, which means customer support teams need to respond quickly and effectively. If not, chances are customers will look elsewhere. That’s why businesses need high-quality machine learning software like aspect-based sentiment analysis to:

  • Automate tagging of all incoming customer support queries.
  • Quickly find out why customers may be unhappy in real time.
  • Send queries and complaints to team members that are best equipped to respond.
  • Gain insights into how your customer support team handles customers.

Final Words

The customer experience should be top priority for any business. Performing customer churn analysis or using the customer feedback loop, for example, can follow the entire customer journey and keep your finger on the pulse of your customers. And machine learning aspect-based sentiment analysis is the key to automatically analyzing your customer opinions for powerful results and data-based decisions.

Automate internal processes with tools you already use, like Zendesk, SurveyMonkey, Google Docs and Sheets, and more. Follow customer sentiment in real time, so you never leave your customers in the cold.

Sign up for free and get started with aspect-based sentiment analysis by creating your own models with MonkeyLearn, and discover how you’ll be able to make smarter business decisions in the future. Or request a demo to learn more about MonkeyLearn’s suite of powerful text analysis tools.

Federico Pascual

March 8th, 2019

Posts you might like...

MonkeyLearn Logo

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.

Try MonkeyLearn
Clearbit LogoSegment LogoPubnub LogoProtagonist Logo