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.