Skip to content

Text porterstemmer

github-actions[bot] edited this page Aug 26, 2026 · 24 revisions

Development build. This page describes main, not a released package. The latest published Lodestar.Text is 0.4.0 — read its documentation.

PorterStemmer

English stemming by Martin Porter's original 1980 algorithm.

public static class PorterStemmer

Example — the textbook plural.

using Lodestar.Text.Stemming;

string stem = PorterStemmer.Stem("caresses");  // => caress

Remarks — reach for this only to match an index that already exists. Porter himself replaced it with Porter2, published as Snowball and available here as EnglishSnowballStemmer, which is his own correction of it. The index page lists all six words the two disagree about.

The algorithm is five steps of suffix rules, gated on a measure of vowel-consonant alternation rather than on named regions — the mechanism Porter2 replaced with R1 and R2. It knows only ASCII letters, so an accented word is not something it was built to receive.

Reference behaviour is nltk.stem.porter.PorterStemmer(mode=ORIGINAL_ALGORITHM), matched over 86 words.

Applies to — net10.0, netstandard2.0.

See alsoEnglishSnowballStemmer, the stemming index.

Members

Member What it does
PorterStemmer.Stem The Porter stem of one English word.

Lodestar

Project

Clone this wiki locally