Skip to content
pubscout

stemmer

3.2.0, released a year ago by an unverified publisher

NLTK-port to perform stemming in Dart and Flutter and reduce words to their base form.

WASM-ready
$ flutter pub add stemmer
Source repository

What it does

The stemmer package provides algorithms like PorterStemmer and SnowballStemmer ported from Python's NLTK library. It reduces words to their base or root form, supporting case-sensitive or default lowercase outputs.

AI-written summary of version 3.2.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to implement search indexing or natural language processing in Dart.
  • You want to reduce English or supported language words to their root forms.

Skip it when

  • You need advanced linguistic lemmatization based on dictionary lookups rather than algorithmic stemming.

Strengths

  • Implements standard Porter and Snowball stemming algorithms.
  • Ported directly from the well-tested Python NLTK library.
  • Supports keeping original casing optionally.

Weaknesses

  • Stemming can produce non-dictionary base words (e.g. 'agreed' to 'agre').
  • Limited to the algorithms ported from NLTK.

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
0

Not documented

import 'package:stemmer/stemmer.dart';

SnowballStemmer stemmer = SnowballStemmer();
stemmer.stem('running'); // outputs: run

Alternatives

Packages that do the same job and could replace stemmer.

  • zxcvbn

    Dart port of Dropbox's zxcvbn password strength estimator library.

Works with

Packages commonly used together with stemmer: ones it builds on, ones built on it, and its own family.