CourseNatural Language Processing: The Complete Course · Module 9: Translation, Multilingual NLP and Evaluating Generation · part 61 of 73
Part 61 · Module 9: Translation, Multilingual NLP and Evaluating Generation

Lesson 2: Multilingual NLP: one router for four languages

57 min read·14 Oct 2026
Module 9 · Lesson 2 · About 50 minutes · Needs: basic Python; sentence embeddings as classifier features (Module 6 Lesson 3) and macro F1 (Module 5 Lesson 1) help; this lesson loads its own data and models

The situation

It is Tuesday 3 November 2026, project week 9. Since 1 July about four in ten messages arrive in German, Spanish or French. Rosa wants to know whether one router can serve all four languages, without a model per language, and whether its score can be trusted for each of them.

One message runs through the lesson: HT44 from the hand-written test set (simulated). It reads "Ich möchte das Commuter Pannier Set zurückschicken. Wie bekomme ich ein Rücksendeetikett?" ("I would like to send back the Commuter Pannier Set. How do I get a returns label?") Ines labels it returns_refund. A router trained on English words calls it order_status.

HT44, TRAINED ON ENGLISH ONLY Ich möchte das Commuter Pannier Set zurückschicken. Wie bekomme ich ein Rücksendeetikett? TF-IDF order_status English encoder product_question multilingual returns_refund
Three routers trained only on English messages read HT44: two get it wrong (red: failure) and the multilingual one gets returns_refund (green: correct).

The rest of this part opens with an account

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