Every language machine begins with an act it rarely admits: it cuts a living sentence into pieces. The pieces are called tokens, the cutting is called tokenization, and the full set of distinct pieces a system recognizes is its vocabulary. Nothing downstream — no count, no probability, no vector — can recover information the cutting destroyed, and nothing downstream is confused by anything except what the cutting kept. That is why tokenization is not a chore before the real work. It is the first modeling decision in the entire system.

What the simplest cutter quietly decides

Start with the simplest cutter: split on whitespace and strip punctuation. Applied to the sentence "Don't buy the waterproof boots — they LEAKED!!" it yields the tokens Don't, buy, the, waterproof, boots, they, LEAKED. Even this naive pass has made four decisions for you.

It kept the apostrophe inside Don't, so Don't, dont, and do n't will be three different vocabulary entries unless you rule otherwise. It kept the capital letters on LEAKED, so LEAKED, Leaked, and leaked are three different words to every counter downstream — a serious problem for sentiment work, where the shouting is a signal about intensity but the word is the same word. It threw away the exclamation marks, which carried feeling. And it threw away the dash, which carried structure. None of these choices is wrong in itself. All of them are wrong if made by accident.

A working tokenizer is a short list of stated rules

The working tokenizer therefore runs as a short list of stated rules, applied in order, each rule's cost named. A typical rule set for customer-message work reads like this.

First, normalize case: fold everything to lowercase, and record shouting separately if you need it. A message in all capitals can set a separate flag before folding, so the intensity survives as data rather than as three vocabularies.

Second, decide contractions. Either split don't into do and n't, so the negation is visible to every later method — sentiment rules depend on seeing that n't — or keep contractions whole and accept that negation hides inside them.

Third, decide numbers: keep 42 as a token, replace every number with a single placeholder token, or drop numbers entirely. For product messages the placeholder usually wins: the fact that a size or a quantity was mentioned matters more than which size it was, and keeping every distinct number fills the vocabulary with entries seen once.

Fourth, handle punctuation deliberately. Sentence-final punctuation marks boundaries worth keeping for later methods. Internal punctuation in words like water-resistant or check-in joins words that splitting would mangle, so hyphens inside words are kept while free-standing dashes are dropped.

The vocabulary has a shape, and the shape forces trade-offs

What survives the rules, counted across a whole collection, is the vocabulary — and vocabularies have a shape every practitioner must know. In any real collection, most distinct words are rare. A large share of the vocabulary appears once or twice, while a small set of common words — the, a, and, product names, politeness formulas — does most of the appearing.

Two consequences follow. First, size decisions are trade-offs, not hygiene. Cutting every word seen fewer than three times shrinks the vocabulary dramatically and loses mostly misspellings and one-off names — but it also loses the rare, precise word, such as delaminated or musty, that sometimes carries a whole review. Second, the system will meet words at work that never appeared when it was built. Those out-of-vocabulary words need a stated treatment: most classical systems map them to a single shared token, so an unseen word is treated as some unknown word rather than crashing the count or being silently dropped in a way that changes a message's length and therefore its scores.

Two refinements, both cheap and both consequential

Stop words are the small, common, low-information words many systems remove before counting. Removing them shrinks vectors and speeds everything — and amputates meaning whenever the small word was the load-bearing one. The word not is on most stop lists, and "the boots are not waterproof" without not is a falsehood the system tells itself. The rule is absolute: a stop list is a modeling choice argued per task, never a default, and negation words are never on it.

Stemming and lemmatization attack the opposite problem: too many forms of one word. Stemming chops word endings by rule, so leaked, leaking, and leaks collapse to a common stem. Lemmatization does the same job with a dictionary, returning the true base form. Both shrink the vocabulary and pool counts that were too thin to learn from. Both can also merge words a human keeps apart. The stemmer that reduces waterproof and waterproofing together is helping; one that mangles a brand name is quietly rewriting your data. Use them when counts are thin and the task is coarse; refuse them when the exact form carries the meaning, as it often does in search.

Hold the standard in one sentence: a token is a promise. By choosing your tokens, you have promised every later method what will be treated as the same and what as different. Every later stage of the system spends that promise. The common belief that tokenization is just splitting on spaces, with the real work starting after, gets the dependency backwards. A system that keeps LEAKED, Leaked, and leaked as three words has tripled its sentiment problem before any sentiment method runs, and a system that deletes not as a stop word has inverted its most important reviews with no error message anywhere. Spend the promise on purpose.

Experience it, don’t just read about it

Splitting, cleaning, and building a vocabulary — the cutting that decides what can ever be counted, matched, or learned is Concept 1 of How Machines Work with Language: Classical NLP for Sentiment, Search and Translation (Course No. 338), from Cognosco Learning, a learning company powered by AI. The course builds the wider classical toolkit beyond this distinction — Counting Words — Bag of Words, Frequencies, and Sparsity, Weighting What Matters — TF-IDF and the Vector Space, and Sentiment by Hand — Lexicons, Negation, and Rules — each worked through with an Agentic Socratic AI coach, one learner at a time. Try a Free Preview at cognoscolearning.com.

Try a Free PreviewAll Signature CoursesThe Corporate License

Navigate your own course.

← All Insights

© 2026 Cognosco Learning. All rights reserved.