This is the machine from Lessons 7 and 10 — live. You feed the corpus and watch every piece work: tokenization, vocabulary, the continuation table and token-by-token generation, with probabilities on display. No magic, no neural network: pure counting you can see through.
The little world the machine knows. One sentence per line.
Each sentence broken into pieces (words and punctuation).
ilikecoffeeiliketeailikecoffeewithmilkshelikescoffeeshelikesbreadthecoffeeiswarmtheteaiscoldidrinkcoffeeinthemorningshedrinksteaatnightcoffeegoeswellwithbreadteagoeswellwithcakethemachinelearnspatternsUnique tokens, each with a number (ID) and how many times it appeared.
How many previous words the machine looks at to predict the next one.
The machine's memory: after each context of 2 words, what came next — and how many times.
It looks at the context, checks the table, picks the next token and repeats.
That is it. By changing the corpus, context size and selection method, you see where every word comes from — and why the same machine can sound predictable or creative. Giant models follow the same cycle, with embeddings and attention instead of raw counting.
← Back to Lesson 10