Introduction To Sentiment Analysis
Introduction To Sentiment Analysis
Sentiment Analysis
Ashish Katrekar
AVP, Big Data Analytics
www.globallogic.com
An Introduction to Sentiment Analysis Ashish Katrekar, AVP, Big Data Analytics
Table of Contents
Introduction .................................................................................................................................................................................................................. 3
Conclusion .................................................................................................................................................................................................................... 6
References ................................................................................................................................................................................................................... 6
Example Example
“iPhone sales are doing well in this bad economy.” Review from XYZ on 7/8/2013 - “I purchased a Galaxy 5S
phone. It is a great phone overall. The screen resolution
Sentiment classification at both the document and is cool and has a good battery life.”
sentence levels are useful, but they do not find what
people like or dislike, nor do they identify opinion targets. This opinion can be expressed by the following
quintuples:
Aspect/Feature Level Classification (Galaxy 5S, screen, +, XYZ, 7/8/2013)
(Galaxy 5S, battery, +, XYZ, 7/8/2013)
In this process, the goal is to identify and extract object
features that have been commented on by the opinion Quintuples form the basis for opinion summarization. The
holder and determine whether the opinion is positive, objective of the quintuple is to convert the unstructured
negative, or neutral. Feature synonyms are grouped, data to a more structured form that can be used
and a feature-based summary of multiple reviews is for further analysis. The initial step is to discover all
produced. quintuples and find the five attributes required by the
quintuplet. Once the data is in a more structured form,
it is much easier to analyze and perform sentiment
Converting Unstructured Text into analysis. Once the quintuples have been extracted, they
Structured Opinions can be fed to visualization and analysis tools.
Aspect Extraction
To identify all the aspect terms present in a sentence, all MPQA Subjective Cues Lexicon (http://www.cs.pitt.edu/
highly frequent phrases across reviews (e.g. food) should mpqa/subj_lexicon.html)
be found and filtered by rules like “occurs right after
sentiment word” (e.g. great food). Then a set of phrases Bing Liu’s Opinion Lexicon (http://www.cs.uic.edu/~liub/
that occur frequently can be built. Another approach is FBS/opinion-lexicon-English.rar)
to determine all the aspects in advance and find them in
the reviews. For a restaurant, the aspects could be: food, SentiWordNet (http://sentiwordnet.isti.cnr.it/)
service, value, décor.
The online lexicons may not be sufficient because
Example they may not have enough words or do not pertain to
“The food was great, but the service was slow.” the domain or topic of discussion. In such a case, a
Aspects: food, service new sentiment lexicon can be built. This can be done
using techniques such as a semi-supervised lexicon,
Sentiment Classification which leverages a small amount of information (e.g., a
few labeled examples or a few hand-built patterns) to
Words express various kinds of sentiments that may bootstrap a complete lexicon through the learning of
be positive, negative, strong, or weak. To perform lexicons. In a bootstrapping approach, a high-precision
sentiment analysis, it is important to understand the classifier is first used to identify some subjective and
polarity of words and classify sentiments into categories objective sentences. A set of patterns is learned from
such as positive, negative, or neutral. This task can be these identified subjective and objective sentences.
accomplished through the use of sentiment lexicons. The learned patterns are then used to extract more
There are different types of sentiment lexicons available subjective and objective sentences. This process can
that have words classified as having positive or negative then be repeated until the desired lexicon is built.
sentiments.
Finding Sentiments for Aspects
Examples
The General Inquirer (http://www.wjh.harvard. For this scenario, let’s analyze reviews for a particular
edu/~inquirer) restaurant. One customer posted the review, “The food
was great, but the service was slow.” The figure below
LIWC (Linguistic Inquiry and word count) (http://www. shows system components for finding sentiments for
liwc.net) aspects.
Sentences &
Sentences Sentences & Final
Reviews Phrases with
& Phrases Phrases with Summary
Sentiments &
Sentiments
Aspects Labeled
Contact
Emily Gunn
Marketing Communications
[email protected]