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.