Find the boundaries
A space is evidence for a boundary, but it is not a universal definition of a word.
Before running the comparison
How many tokens should this text contain? Identify one boundary that a computer could reasonably handle in more than one way.
Compare three rules
The same visible text becomes three different datasets.
Which output is correct?
No output is universally correct. A useful tokenizer preserves distinctions needed for a particular analysis while remaining consistent.
Notice: Changing tokenization also changes frequency counts, vocabulary size, and every model trained from those observations.
Learn BPE tokens, one merge at a time
Begin with characters, rank adjacent symbol pairs, and preview how each merge changes the corpus and vocabulary.
Round 0 counts adjacent characters. Later rounds count adjacent symbols, so a pair may include a previously learned multi-character token. ▁ marks a word beginning. For visibility, this teaching version begins with Unicode grapheme characters rather than raw bytes.
Most frequent adjacent pairs
Current round| Rank | Pair | Count |
|---|
Next-round preview
Merge the highest-ranked pair
Segmentation after the merge
Preview onlyTop pairs in the new round
Recounted after merging| Rank | Pair | Count |
|---|
Vocabulary after the next merge
0 symbolsMerge history
Open a round to inspect its vocabularyDid the algorithm discover morphemes?
Sometimes a frequent character sequence aligns with a morpheme. That does not mean the procedure understands its grammatical function or meaning.
Test it: Choose “Related word forms.” Advance several rounds and compare how teach, teacher, and teaching are segmented.
Stress-test the assumptions
A rule that looks natural in English may encode the wrong boundaries elsewhere.
Select a stress test, then inspect the three tokenizers above.
Exit question
Is tokenization merely preprocessing—or is it already a theory about linguistic structure?
Use one disagreement between the tokenizers as evidence.