Skip to content

Text 0.4.0 frenchsnowballstemmer stem

github-actions[bot] edited this page Aug 21, 2026 · 1 revision

Lodestar.Text 0.4.0. This page is frozen at that release. Read the current documentation for what main says now. A link to a decision or a migration page follows main, and leaves the archive.

FrenchSnowballStemmer.Stem

The Snowball stem of one French word.

public static string Stem(string word)

Parametersword is a single French word. It is lowercased and NFC-normalised before the rules run.

Returnsstring, the stem, always lowercase. Accented characters survive when the stem keeps them.

ExceptionsArgumentNullException when word is null. An empty string, or a word of one character, is returned lowercased and otherwise untouched.

Example — an adverb reduced to its root, and two forms of one verb meeting.

using Lodestar.Text.Stemming;

string adverb = FrenchSnowballStemmer.Stem("amoureusement");  // => amour
string infinitive = FrenchSnowballStemmer.Stem("finir");  // => fin
string participle = FrenchSnowballStemmer.Stem("finissant");  // => fin

Remarksamoureusement losing both -ement and -eux in one pass shows the step ordering doing its work: the adverbial suffix goes first, and what it uncovers is then eligible for the next rule. This is why the steps are conditional on each other rather than independent.

Aggressive is the right word for the result. continuellement reduces to continuel, and verbs of the second group lose most of their length. That is appropriate for an index and wrong for anything shown to a reader.

Applies to — net10.0, netstandard2.0.

See alsoFrenchSnowballStemmer, the stemming index.

Lodestar

Project

Clone this wiki locally