Start studying
Module 4 · NLP Module contents
Module 4  ·  Card 8 / 20beginner

Sentiment Analysis

Sentiment analysis judges whether a piece of text is positive, negative or neutral.

It is the most common commercial use of text classification, applied to reviews and support tickets.

The first systems counted words from a good and bad list, which negation defeats immediately.

Not bad at all reads as negative to a word counter and positive to any model that reads context.

Sarcasm, comparison and mixed opinions in one sentence remain genuinely hard for every approach.

Learn in depth ↓
Module 04 · NLP · 20 concepts
In depth  /  15 lines

Sentiment Analysis, in more detail

Sentiment analysis asks what attitude a piece of text expresses, most often on a three-point scale.

It is the application that put text classification into ordinary business use.

Product reviews, app store feedback, survey answers and support tickets all get scored this way.

The earliest method was a lexicon: a list of positive words, a list of negative ones, and a tally.

It needs no training data at all, which is why it spread so fast, and it fails in obvious ways.

Negation is the first failure, since not bad contains a negative word and means the opposite.

Intensifiers and hedges are the second, as very and slightly change the strength but not the tally.

Supervised models trained on labelled reviews handled these far better and became the standard.

Transformer models read the whole sentence, so negation and word order finally land correctly.

The remaining hard cases are the ones people find hard to agree on too.

Sarcasm inverts sentiment with no surface signal, and often needs context the text does not carry.

Comparison is another trap: better than their last model is praise for one product and criticism of another.

A single review frequently mixes opinions, loving the screen and hating the battery.

Aspect-based sentiment analysis exists for that, scoring each feature mentioned rather than the document.

Whatever the method, the labels themselves are subjective, so human agreement sets the ceiling on any score.

Want the full technical article? Wikipedia ↗
Test yourself

One question on this card. Every option explains itself once you pick, right or wrong.

Question 1
Why does a word-list sentiment system misread "not bad at all"?
NLP

20 concepts in this module, then a graded test with every answer explained.

Study this module →
↑↓ move↵ openesc close