liveBook · Manning

Stop-word removal

As explained in Natural Language Processing in Action, Second Edition

A stop word filter is a text-processing filter that removes selected high-frequency function words from tokenized text.

Stop-word removal filters selected high-frequency function words from tokenized text, often before building bag-of-words vectors. The shortcut can shrink representations, but dropping articles, prepositions, or verb forms may discard meaning and reduce precision or accuracy. section 2.3.1 section 1.5.3

A practical stop-word filter involves:

  • Tokenize the input before filtering; the filter operates on individual tokens. section 1.5.3
  • Choose a maintained list from sources such as NLTK, spaCy, or broader multilingual lists rather than assuming every common word is disposable. section 2.3.1
  • Inspect the filtered output and measure its effect, because exhaustive lists can remove important tokens and rarely guarantee better pipeline accuracy. section 2.3.1

Filtering a short sentence

Given the tokens “the words were just as I remembered them,” a broad list leaves only “I” and “remembered.” The result is smaller, but much of the original meaning has disappeared. section 2.3.1

How Natural Language Processing in Action, Second Edition covers it

How deep it goes
Defines filtering, demonstrates list-based implementation, and evaluates meaning loss without descending into model internals.
Examples
Uses Python list filtering, NLTK’s English list, and a sentence reduced to “I” and “remembered.”
What it assumes
Assumes tokenized text and introduces stop-word filtering as a stage between tokenization and vector construction.
What you can do after
Apply it via Python list filtering or NLTK, then inspect whether reduced tokens preserve useful meaning.
How it connects
Connects tokenization, bag-of-words, rare word filtering, and n-grams within an NLP preprocessing pipeline.

Also explained in

Compare how 4 books explain stop-word removal →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Natural Language Processing in Action, Second Edition. The section links point to the parts of the book it draws on.