Stemming Explained: Normalize Search Terms with Word Stems
Learn when stemming helps search, how it differs from lemmatization, and how to evaluate a stemmer.
Stemming Explained: Normalize Search Terms with Word Stems
Stemming reduces word endings with rules to group related forms under a stem. In English search, forms such as connected, connecting, and connection may be conflated as connect. A stem is not guaranteed to be a dictionary word or to have exactly the same meaning.
Stemming is usually rule-based; lemmatization seeks a dictionary lemma and may rely on lexical resources and part-of-speech information. Porter’s 1980 English algorithm was designed for information retrieval. In NLTK 3.9.2 documentation, Snowball English maps generously to generous, while Porter maps it to gener. Results vary by implementation, so record the library, version, and mode.
from nltk.stem.snowball import SnowballStemmer
english = SnowballStemmer("english")
porter = SnowballStemmer("porter")
for word in ("running", "generously"):
print(word, english.stem(word), porter.stem(word))For search, normalize documents and queries the same way, then compare with a no-stemming baseline. Check both missed matches and harmful conflations on representative queries and relevance judgments. Disable or use a more conservative method if errors rise. Do not treat stems as user-facing words or assume one algorithm suits every language.
References
[Porter, “An algorithm for suffix stripping” (1980)](https://www.cs.toronto.edu/~frank/csc2501/Readings/R2_Porter/Porter-1980.pdf)
[NLTK stemmer examples (3.9.2 documentation)](https://www.nltk.org/howto/stem.html)
[NLTK WordNetLemmatizer documentation](https://www.nltk.org/api/nltk.stem.wordnet.html)