2D companion to the 3D letter-block scene: identical algorithm, drawn as a flat row of canvas tiles instead of rendered 3D blocks. The Porter stemmer (Porter, 1980) reduces a word to its stem purely by pattern-matching suffixes against a fixed rule table — no dictionary, no meaning, just letters. Many rules are gated by the word's measure m: split the letters into vowel/consonant runs V and C, and the word has the shape [C](VC)m[V]. m counts how many VC pairs sit in the middle, after stripping any leading C-run and trailing V-run:
TR|EE m=0 (no VC pair)
TROUBL|E m=1 C-VC-V
TROUBL|ES m=2 C-VC-VC
Y is a consonant unless the letter before it is a vowel
Step 1a strips plural endings (SSES→SS, IES→I, S→ε). Step 1b strips ED/ING when the stem still contains a vowel, then patches the result (AT→ATE, doubled consonants like HOPP→HOP). Later steps (m>0 or m>1 gated) peel off derivational suffixes like -ATIONAL, -ICATE, -ATIVE, -MENT, right down to a bare stem — which is often not a real dictionary word (ARGUMENT → ARGU).
Lemmatizer mode looks the word up in a small hand-built dictionary instead and returns its real base form (BETTER → GOOD, MICE → MOUSE) in one step — slower to build, but the output is always a valid word. That trade-off — fast/approximate rules vs slow/exact lookup — is the same one every NLP pipeline still makes when choosing a normalization strategy.
- Word / custom input — pick a preset or type your own; the tile row rebuilds.
- Stemmer vs Lemmatizer — switch which reduction algorithm drives Step/Auto-play.
- Step / Auto-play — advance the algorithm one rule at a time, or watch it run.
- Underline below each tile dims the leading consonant run and trailing vowel run, and brightens the VC pairs actually counted toward measure m.