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.