Skip to content

Text 0.4.0 italiansnowballstemmer 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.

ItalianSnowballStemmer.Stem

The Snowball stem of one Italian word.

public static string Stem(string word)

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

Returnsstring, the stem, always lowercase.

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

Example — a stressed final vowel written both ways, and the divergence worth knowing about.

using Lodestar.Text.Stemming;

string accented = ItalianSnowballStemmer.Stem("attività");  // => attiv
string plain = ItalianSnowballStemmer.Stem("attivita");  // => attiv
string diverging = ItalianSnowballStemmer.Stem("esistenza");  // => esistt

Remarksesistt is not a typo and not a bug. It is what nltk returns, and matching nltk is what this package is checked against; the published algorithm would give esistent. The reasoning is in decisions/0008, and the practical consequence is that the stem is still a usable key — every enza/enze word the rule reaches is transformed the same way — while being unreadable.

The rule only fires inside R2. pazienza keeps its suffix and stems to pazienz, which is why the two words with the same ending come out looking unrelated.

Applies to — net10.0, netstandard2.0.

See alsoItalianSnowballStemmer, the stemming index.

Lodestar

Project

Clone this wiki locally