Snowball stemming for Elixir, backed by the Rust rust-stemmers
crate through a Rustler NIF.
Unlike the pure-Elixir stemmer package (English only), this supports the full
Snowball language set — French included — and is a maintained replacement for the
abandoned stemex.
iex> Stemmers.stem("mangeant", :french)
"mang"
iex> Stemmers.stem("running", :english)
"run"Safety
rust-stemmers is safe Rust (no unsafe), and Rustler converts any Rust panic
into an Elixir exception, so a bad input cannot bring down the BEAM. stem_all/2
is scheduled on a dirty CPU scheduler so large batches never stall a normal
scheduler thread.
Summary
Functions
Stem a single word in the given language.
Stem a list of words in the given language, reusing one stemmer instance.
Whether lang is a supported Snowball language.
The list of supported Snowball languages, as atoms.
Types
Functions
Stem a single word in the given language.
Raises ArgumentError on an unsupported language so callers get a clear message
instead of an opaque NIF decode error.
Stem a list of words in the given language, reusing one stemmer instance.
Whether lang is a supported Snowball language.
@spec supported_languages() :: [language()]
The list of supported Snowball languages, as atoms.