Stemmer class

Reduces words to their base form (stem) using the Snowball algorithm.

Supports 28 languages (see Stemmer.new for the full list). Construct with a Locale and call stem on individual tokens.

final stemmer = Stemmer(Locale.parse('en'));
print(stemmer.stem('libraries')); // → 'librari'
print(stemmer.stem('running'));   // → 'run'

Constructors

Stemmer(Locale locale)
Creates a Stemmer for the given locale.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
languageCode → String
The IETF language code this stemmer was created for (e.g. 'en').
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
stem(String word) → String
Returns the stem of word.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited