Lesson 1: Turning messages into word and character counts
55 min read·14 Oct 2026
Module 4 · Lesson 1 · About 45 minutes · Needs: basic Python; tokens and vocabulary size from Module 2 help but are not required
The situation
It is Monday 28 September 2026, project week 4. The rule router from Module 1 is still the baseline, and Rosa wants to know whether a trained model can beat it. A model learns from numbers, not from sentences, so every message has to become a row of numbers first.
Ines picks the test case, message TW-M0280 from 9 April: "Volt 2 battery dead again. Second pack in a month. I want this sorted properly this time." This lesson turns it, and the rest of the simulated inbox, into counts of words, word pairs and letter groups, and shows the mistakes that quietly ruin them.