1 / 4
Text becomes rows in a table
Visit every sentence, take the last two words, and count what came next.
—
sentences
—
token
—
rows in the trigram table
Show a real sample of the training text
The text contains 26 distinct sentence patterns. Some repeat more often than others; those repetitions become counts and probabilities in the table.
Example
From a sentence to one table row
trigram
Context row: “the boy drank”
—
| Next word |
Count |
Probability |
No row exists for this context.
P(milk | the boy drank) = 50 / 100
Choice: —
Ready
Press “Generate from the table.”
Observed context
the boy drank
100 observations
A linguistically similar but absent context
the child drank
0 observations
The table does not know that “boy” and “child” are similar. Every context is an independent cell.