Section navigation

Public classAbstract SnowballStemmer

Namespace
Rowles.LeanCorpus.Analysis.Stemmers
Assembly
Rowles.LeanCorpus.dll

Abstract base for Snowball-inspired stemmers that apply ordered suffix-removal steps. Each language stemmer supplies its own suffix lists and may override pre-processing, post-processing, and minimum-length thresholds.

public abstract class SnowballStemmer : ISpanStemmer
Inheritance
SnowballStemmer
Implements
Derived

Public property MinStemGuard

Minimum characters to preserve after suffix removal.

Public property MinWordLength

Minimum word length required to attempt stemming.

Public property Steps

The suffix-removal rules, grouped by step.

Public method MaxOutputLength(string)

Maximum output length needed (overridden by stemmers that expand input).

Public method Postprocess(Span<char>, int)

Optional post-processing called after all suffix-removal steps. Returns the adjusted length.

Public method Preprocess(ReadOnlySpan<char>, Span<char>)

Optional pre-processing called before suffix removal. Copies word into output (possibly transforming it) and returns the new length. Return -1 to use the default (untransformed copy).

Public method Stem(ReadOnlySpan<char>, Span<char>)

Stems word into output. Returns the length of the stemmed result, or -1 if output is too small. The caller must ensure output.Length >= word.Length for guaranteed success.

Public method Stem(string)