Home▸AI & Machine Learning▸Stemming vs Lemmatization: Rule-Based Suffix Stripping

Stemming vs Lemmatization: Rule-Based Suffix Stripping (2D)

2D companion to the 3D letter-block simulator: watch the Porter stemming algorithm strip suffixes off a word tile by tile — with the vowel/consonant 'measure' m highlighted live on a flat canvas row — and compare it against dictionary-based lemmatization.

AI & Machine Learning2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-natural-language-processing ↗ Open standalone

Before a language model ever sees a probability or an embedding, raw text usually passes through a normalization step that collapses inflected forms — "running", "runs", "ran" — toward a single root. This 2D companion renders a word as a flat row of canvas letter tiles, color-coded vowel vs. consonant, and steps through the real Porter stemming algorithm's suffix-stripping rules live, computing the vowel-consonant "measure" m that gates each rule exactly as the 1980 algorithm specifies. A dictionary-based lemmatizer mode runs the same words through a lookup table instead, so you can watch the two normalization strategies diverge — the stemmer's fast rule-chopping versus the lemmatizer's slower but always-valid dictionary answer.

⚙ Under the hood

2D companion to the 3D letter-block simulator: watch the Porter stemming algorithm strip suffixes off a word tile by tile, with the vowel/consonant measure m highlighted live, and compare it against dictionary-based lemmatization.

NLPstemminglemmatizationPorter algorithmtext normalizationlinguistics

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)