Aspect Based Sentiment Analysis

apsect based sentiment analysis

The Wisdom of Crowds: Why the Many Are Smarter Than the Few and How Collective Wisdom Shapes Business, Economies, Societies, and Nations, is a book written by James Surowiecki about the aggregation of information in groups, resulting in superior decision making than that made by a single member of the group.  Sentiment analysis embodies the maxim of ‘The Wisdom of Crowds’, by extracting underlying customer emotions from customer reviews, social media posts, emails, voice recordings, video commentary, etc. thereby orienting business operations to customers propensities. Aspect-based sentiment analysis ( ABSA), takes the sentiment analysis process to a more granular level by first identifying different aspects of a business and then unearthing the sentiment related to that aspect. Let us look at an example.

The restaurant had great interiors. However, we had to wait a long time before we were served. Needless to say the food was worth the wait, little on the higher side though.

This is a typical customer review you will find in any digital channel. A traditional sentiment analysis tool, which just classifies whether the text has positive, negative, or neutral reviews would struggle in such cases. This is because in this text there is a mix of both positive and negative reviews. Besides, the management team of a restaurant may not be satisfied just by knowing the overall sentiment of the restaurant. They would want to know what’s going right and what is not. This is where Aspect based sentiment analysis comes in handy. Let us again look at the earlier example and then extract the different aspects from this text.

This piece of text contains multiple aspects and multiple sentiments. Let us break down the text and extract the aspects and sentiments.

The restaurant had great interiors: Aspect: Restaurant; Sentiment: Positive

We had to wait a long time before we were served: Aspect: Service; Sentiment: Negative

the food was worth the wait: Aspect: Food/Product; Sentiment: Positive

A little on the higher side though. : Aspect: Price; Sentiment: Negative

As seen from the above there are multiple aspects and different sentiments related to the aspects which is in play in this review. And the extraction of aspects and sentiments using NLP techniques involves multiple steps

The first one is to identify all the aspects of the business which is mentioned in the review. Identification of the aspects is a domain-specific task. The general classification of the aspect could be very common for domains. For example aspects like the product, price, service, delivery, ambience, merchandise, etc. could be common between domains. However, what each of these means for the specific context would be different. Let us take a look at the text for two different domains. Online retail grocery and restaurants.

AspectOnline Retail groceryRestaurants
ProductsBakery, confectionary, frozen, beveragesAppetizers, soups, entrets, dessert
ServiceCustomer service for the online storeInteraction with waiters
AmbienceNavigation through an online storeThe interior of a restaurant, music, location etc
MerchandiseThe products available in stockMenu

As seen from these examples, the context of an aspect varies widely between domains.  Even within the same domain, it would again be dependent on the individual businesses as to what aspect they really want to track. For example, in an upmarket specialty dining restaurant, they might not be interested in tracking what customers think about price rather they would be more interested in say the ambience, service, quality, etc. However, for a medium-range multi-cuisine restaurant’s focus would be more on customers’ perception of price along with quality and service. So as seen from these examples, the identification of aspects is very domain-specific and could also be individual business-specific.

Unlike aspects, sentiment is more generic and does not depend much on domains or specific businesses. The repertoire of words used to represent each type of sentiment does now vary much between domains and businesses. 

Implementation of Aspect Based Sentiment Analysis Systems

Now that we have discussed some of the nuances of ABSA, let us look at its implementation details. From an implementation perspective, there are different approaches to implementing this system. There are approaches where a single model identifies the aspects and classifies a sentiment for the aspect. There are also approaches where each of these tasks is done by task-specific models. In this approach identification of aspects in a text is done by a model and then identification of sentiment of the words around that aspect is done by a different model. Another nuance that can be brought around this is in using tools like POS extractors to extract the descriptors of each aspect. This can be done using POS taggers available in libraries like NLTK. From a modeling perspective different types of models are used for the task right from traditional classification models like Naive Bayes, Random forest, Xgboost etc. to Deep learning based sequence to sequence models like RNN/LSTM, attention models, and also state of art models like transformers. 

How can business benefit from Aspect Based Sentiment Analysis implementation

The real value to the business from a typical aspect based sentiment analysis is not just by extracting the aspects and its sentiments but by using it as a tool to initiate process improvement across the business. This can be done by connecting the results of the aspect based sentiment analysis with the order management system or CRM system. When clubbing ABSA results with these data sets, businesses will get a different dimension of the aggregated sentiment at specific locations, from specific customer segments or specific functions of the business. When the sentiments are aggregated across these dimensions, businesses will have the ability to understand what is lacking from a process perspective across these dimensions and actions can be taken to improve them. Many businesses have used these tools to improve processes, improve customer retention, get feedback on new product launches, etc., and then initiate transformation initiatives,. These techniques also can act as a means to identify tectonic shifts in customer preferences early. Tracking the aggregated customer voices across time and across different aspects will give an early indicator of changing customer propensities. These can become very critical steps in aligning businesses closer to what customers want and also to be aligned to the changing needs of the customers.

Thomas V Joseph is a Data Science Architect at Saksoft, Chennai India. He has more than 21 years of total industry experience primarily in Data Science, Strategy Consulting, Process consulting, and business development. His current interests range from Causal AI, Applications of reinforcement learning for Business use cases, Computer vision, and Natural Language processing. He is a co-author of two titles on Data Science   https://www.amazon.in/Deep-Learning-Workshop-hands-understanding/dp/1839219858 https://www.amazon.in/Data-Science-Workshop-learning-real-world-ebook/dp/B08H4G9R34 published by Packt (https://www.packtpub.com/).