CourseNatural Language Processing: The Complete Course · Module 6: Word and Sentence Embeddings · part 41 of 73
Part 41 · Module 6: Word and Sentence Embeddings

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?

HT18 AND ITS TYPO TWIN battery dead. again. battery dead again every word has a column batery dead. again. batery dead again batery: no column, no vector
One missing letter turns the most important word of HT18 into a word no vocabulary has (blue: a word the model knows; red: a word it has never seen).

The rest of this part opens with an account

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