Sentiment Analysis

Also known as: opinion mining, polarity classification, 情感分析.

Automatically classifying text by the attitude it expresses, usually positive, negative or neutral. It reads wording, not truth, and has well-known blind spots.

Synthetic dataExamples on this page use synthetic data created for illustration.

Definition

Sentiment analysis is the automatic classification of text by the attitude it expresses, usually positive, negative or neutral, sometimes as a score. It works on wording, not truth, and struggles with sarcasm, negation, specialised vocabulary and texts that contain mixed opinions.

In plain terms

Simple systems look words up in a list of positive and negative terms; others learn from texts labelled by people. Either way the result is only as good as its agreement with human readers, which should be measured on a sample of your own texts (see Cohen's Kappa), because a model built for product reviews often does poorly on news.

Two more questions matter. Toward what? A sentence can be positive about one company and negative about another. And whose view? The sentiment of what was written is not the sentiment of the public; it is the sentiment of the people who wrote, in the sources collected.

Example

A naive word-list scorer (+1 for “good” or “great”, −1 for “bad” or “fell”) against a careful reader:

SentenceNaive scoreA careful reader
“The product is not good.”+1Negative (negation)
“Oh great, another delay.”+1Negative (sarcasm)
“Our shares fell after the recall.”−1Negative for us
“A rival’s shares fell after the recall.”−1Positive for us

Three of four are wrong, which is why the scorer must be checked against human labels before its averages are trusted.

Common misunderstandings

  • “A sentiment score measures quality or truth.” It measures the tone of the wording.
  • “A model that works on reviews works on news.” Vocabulary and style differ by domain; test it on your own texts.
  • “Average sentiment shows how people feel.” It shows the tone of the sources collected, which are not a sample of everyone.

References

  1. Bo Pang, Lillian Lee. Opinion Mining and Sentiment Analysis . Foundations and Trends in Information Retrieval, 2008. DOI: 10.1561/1500000011
  2. Bing Liu. Sentiment Analysis and Opinion Mining . Synthesis Lectures on Human Language Technologies, 2012. DOI: 10.2200/S00416ED1V01Y201204HLT016