CourseNatural Language Processing: The Complete Course · Module 3: Linguistic Structure: Tags, Parses and Entities · part 21 of 73
Part 21 · Module 3: Linguistic Structure: Tags, Parses and Entities

Lesson 2: Dependency parsing: who did what to what

34 min read·14 Oct 2026
Module 3 · Lesson 2 · About 40 minutes · Needs: basic Python; Lesson 1 of this module helps (spaCy's Doc and Token, part-of-speech tags) but is not required

The situation

It is Monday 21 September 2026, project week 3. Ines is checking the hand-written test set and stops at HT08: "I don't want the Volt 2, I want something without a battery for my commute. Is the Harbour any good on hills?" She labelled it product_question, for Callum.

A rule that spots words sees "Volt 2" and "battery", the words of a battery fault. The words are right; their roles are wrong: the customer refuses the Volt 2 and asks about the Harbour. Telling the two apart needs the grammar: which word is the subject, which the object, and what "don't" applies to. A dependency parser gives you that.

HT08, LABELLED PRODUCT_QUESTION I don't want the Volt 2, I want something without a battery ... Harbour ...? word spotting Volt 2 + battery: a fault? grammar refuses Volt 2, asks Harbour
Word spotting sees "Volt 2" and "battery" (amber) and guesses a fault (red); the grammar says the customer refuses the Volt 2 and asks about the Harbour (green).

The rest of this part opens with an account

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