Lesson 2: Borrowed word vectors, and words nobody has seen
57 min read·14 Oct 2026
Module 6 · Lesson 2 · About 50 minutes · Needs: basic Python; Module 4 (TF-IDF and logistic regression) helps; Lesson 1 of this module (word2vec) helps but is not required
The situation
It is Monday 12 October 2026, project week 6. Customers do not spell carefully, and the TF-IDF classifier from Module 4 knows only the words it saw in training: a misspelt word is not one of its columns.
One message runs through the lesson: HT18 from the hand-written test set (simulated), "battery dead. again.", labelled warranty_fault. Beside it sits a typo twin, added in this lesson: "batery dead. again." Rosa asks: could word vectors trained on far more text, or vectors that can read a misspelling, route the inbox better?