# Aspect-Based Opinion Mining

## Summary


Aspect-Based Opinion Mining (ABOM) involves extracting aspects or features of an entity and figuring out opinions about those aspects. It's a method of text classification that has evolved from sentiment analysis and named entity extraction (NER). ABOM is thus a combination of aspect extraction and opinion mining. While opinions about entities are useful, opinions about aspects of those entities are more granular and insightful.

The ABOM workflow constitutes initial text pre-processing, POS tagging, splitting sentences to extract aspects and classifying them into various dimensions/buckets. 

A 2018 survey states that 90% of the total data in world has been generated in last two years in the form of tweets, text, images and video. ABOM is therefore important in analyzing this unstructured data.

## Discussion

### What is opinion mining and its importance?

Suppose a written or spoken content expresses an opinion about some subject. Extraction of these opinions is called **opinion mining**. For example, "Adam was very satisfied with the flavour of black tea at Starbucks". Here we extract a positive opinion about black tea (entity) whose aspect is flavour.

With increased use of online transactions and service-based industries, there has been immense growth of consumer reviews and opinions through voice or text. Opinion mining finds out sentiments from these reviews and estimates customer satisfaction. 

Sentiment analysis and opinion are related. Sentiment analysis is first done to extract positive, negative or neutral sentiments. This leads to opinion mining using various text classifiers. 


### What do you mean by aspects and why are they relevant?

Consider the example of "ice-cream" as the entity. Aspects or features of this entity include flavour, temperature, taste, presentation, etc. A person may express that he disliked the ice-cream but this is expressing opinion on the overall entity. If we analyze this deeper, we may find that the person liked the flavour and the presentation but didn't like the taste. Thus, figuring out opinions on specific aspects gives more useful information that can aid decision making. 

With "restaurant" as the entity, its aspects could include food, service, price, ambience, etc. Often user reviews or ratings of the restaurant as a whole is not actionable. However, if we know that the food was great but the music was terrible, the restaurant owner can take actions to improve on specific aspects. 


### What's the workflow of ABOM?

ABOM involves data collection, data cleaning, extraction of aspects and entities, classification of aspects and entities, sentiment scoring of aspects, evaluation and validation. 

Text is typically split into sentences and parsed according to Named Entity Recognition (NER), which extracts the entities. With aspect mining, we find out features or characteristics of these entities.  There are some automated aspect extractor APIs. The output from such APIs can be validated and improved manually. 

Data pre-processing is time consuming. Selecting and training aspects of entities are complex tasks. Some approaches include aggregate score of opinion words, SentiWordNet, aspect table, dependency relations, emotion analysis using lexicon and semantic representation. 

Opinion mining is usually a rule-based approach where frame certain rules to identify most used words. These are further analyzed and processed. A dictionary-based approach is to curate common words of aspect terms for further classification according to various domains.


### Could you describe the classification of opinions in ABOM?

Classification of opinion completely depends on the dataset and business problem. Opinion classification could be trend based, aspect based, sentence based, etc. from tweets, reviews, blogs and others. The most versatile way of classification holds positive and negative analysis.

Similarly, classification can be done on a multi-aspect basis using co-occurrence of aspects and sentiments, aspect-sentiment hierarchy and polarity classification of sentiments. These are different approaches of classification where aspects are filled in different buckets according to polarity from sentiment scores or design/occurrence of aspects with POS tags. 

There are several researchers who work on automatic aspect generation and classification after effective cleaning of unwanted and irrelevant sentences. Insignificant words or sentences make the data noisy and degrade the classification accuracy. To get rid of this, automatic aspect extraction methods like fuzzy aspect based opinion classification can be used. This method covers the demerits of infrequent and coreferential aspects and gives a good classification accuracy.


### What are some techniques for extracting aspects?

Among the **supervised** techniques are Hidden Markov Model (HMM), Conditional Random Fields (CRFs) and dependency tree kernels. Among the **unsupervised** ones are frequency or statistical methods, rule-based methods, and Pointwise Mutual Information (PMI). Latent Dirichlet Allocation (LDA) from topic modelling has also been adapted and applied.  

PMI is a score that indicates how often a candidate aspect co-occurs with an entity. Low PMI implies it's probably not an aspect. PMI has been used along with Term Frequency-Inverse Document Frequency (TF-IDF). 

Some techniques are able to extract both explicit and implicit aspects. Association rule mining and clustering have been adapted for extracting implicit aspects. Dependency rules and lexicons such as WordNet and SenticNet have been used to identify implicit aspects. 

Some techniques jointly model both aspects and opinions. One well-known technique is called **double propagation** that exploits syntactic relations of opinion words and aspects. From known opinion words, aspects can be extracted. From known aspects, new opinion words can be identified; and so on. 

Neural network approaches such as CNN, LSTM, and attention mechanisms have been applied as well. 


### Could you share some tips and best practices for doing ABOM?

When extracting aspect, we must always know which entity it belongs to. Consider for example "The picture quality of this camera is amazing" versus "I love this camera". In the former sentence, "picture quality" is the aspect. In the latter sentence, camera entity is evaluated as a whole and hence the aspect is "general". 

It's essential to consider the domain of application. The phrase "please go and read the book" is a positive opinion for a book review but a negative one for a movie review. This implies that we should train our models with domain-specific data. 

Sometimes opinion words on their own are inadequate. They need to be analyzed along with the aspect. For example, even within the same domain of digital cameras, "long" can either be positive or negative depending on the context, such as "long battery life" versus "takes long time to focus". 


### For a developer, what are some resources and projects to learn ABOM?

One can start an ABOM project from online reviews. There are many e-commerce and social websites containing thousands of reviews on any topic, person or product. Twitter, Facebook, Amazon, MouthShut, and Yelp are example sources.

These reviews can be scraped using any API or libraries like BeautifulSoup or Scrapy in Python. Some sample projects can be aspect-based sentiment analysis for e-commerce websites or restaurants. In latent aspect rating analysis, ratings were predicted using the latent opinions from review text data. This work can be replicated in different industries such as hospitality, automotive, and education. 


### What are some industrial applications of ABOM ?

ABOM applications is spread out across various industries wherever there is customer feedback. Examples include travel, automotive, hotel, tourism, ecommerce and many more.

Usually, before any hotel booking, people read reviews. We can distribute these into several buckets like service, ambience or hygiene. This makes it easier for customers to compare different hotels. Similarly, there are several websites for travel like Yelp, Trip Advisor or MakeMyTrip that categorize the service into relevant aspects and shows it in the form of ratings.

In every industry, reviews are broken down into aspects and rated it according to domain knowledge. Good domain knowledge is essential for better decision making. Before any drug trials or testing, there needs to be a lot of expert opinion from doctors and domain-specific experts. This work takes very long to come to a conclusion. ABOM simplifies it by rating several aspects like adverse reactions, efficacy of a drug, symptoms and conditions of patients. 

## Milestones

2000

The early 2000s, sees the birth of social networking sites. Blogs, online reviews, and other forms of unstructured content online become common. This leads to **opinion classification** from web documents, which are assessed for positive or negative sentiments. 

2004

Work on opinion mining starts with the realization that importance of opinions on various aspects is more insightful rather than summary of reviews. At this time, ABOM is named **feature-based opinion mining**. Researchers start working on text summarization and **opinion mining** due to large scale availability of customer reviews and an increasing demand for customer satisfaction.

2007

Aspect evaluation relations and aspect-of relations are combined together. Contextual and statistical combination started to be used in text classification based on opinions. 

2011

Researchers start to rank aspects according to various web-based opinions after training them. New **opinion search engine** is proposed. This searches for the item along with its summary of sentiments across features. This gives a start to **automatic aspect extraction**. 

2013

Aspect based opinion mining is now popular in many industries. This enhances consumer satisfaction and drives **decision making**. Techniques begin to recognize explicit versus implicit aspect expressions. Precision and recall scores from experiments exceed 90%. 

2017

Due to millions of online reviews, a user could get confused about the features of product. By scraping online reviews and content, ABOM can now be used as a **personal recommender**. People are given recommendations according to their choices and preferences. 

2018

As a **neural network approach** to ABOM, Long Short-Term Memory (LSTM) is used for extracting opinion target expressions (OTEs) and aspect sentiment polarities. Using various types of neural networks is an art now for researchers and we hope to see better accuracy and automation in ABOM across various industries.