CourseNatural Language Processing: The Complete Course · Module 5: Evaluation, Sentiment and Topics · part 35 of 73
Part 35 · Module 5: Evaluation, Sentiment and Topics

Lesson 3: Sentiment analysis: word lists, models and their limits

57 min read·14 Oct 2026
Module 5 · Lesson 3 · About 50 minutes · Needs: basic Python; Module 4 Lessons 2 and 4 (TF-IDF and logistic regression) help but are not required

The situation

It is Monday 5 October 2026, project week 5. Rosa wants a Monday report: what are customers unhappy about, and is it getting worse? Ines has labelled the sample data neg, neu or pos, but she cannot read 430 messages a month, so a program must score the mood of each one.

One message runs through the lesson, HT01 from the hand-written test set: "Oh brilliant, the Volt 2 battery died halfway up the hill again. Really loving my £2,199 paperweight." Ines labelled it negative. Every method here gets a try at it (simulated data).

HT01, HAND-WRITTEN TEST SET "Oh brilliant, the Volt 2 battery died halfway up the hill again. Really loving my £2,199 paperweight." Ines: neg the gold label word list: ? section 2 trained model: ? section 4
HT01 is angry but full of happy words; Ines's label (green: the gold answer) is negative, and every method in this lesson (amber: a guess) gets a try at it.

The rest of this part opens with an account

Signing up is free and takes one email. Nothing to pay, and nothing renews.