snowball.pl -- The Snowball multi-lingual stemmer library
This module encapsulates "The C version of the libstemmer library" from the Snowball project. This library provides stemmers in a variety of languages. The interface to this library is very simple:
- snowball/3 stems a word with a given algorithm
- snowball_current_algorithm/1 enumerates the provided algorithms.
Here is an example:
?- snowball(english, walking, S). S = walk.
- snowball(+Algorithm, +Input, -Stem) is det
- Apply the Snowball Algorithm on Input and unify the result
(an atom) with Stem.
The implementation maintains a cache of stemmers for each thread that accesses snowball/3, providing high-perfomance and thread-safety without locking.
- snowball_current_algorithm(?Algorithm) is nondet
- True if Algorithm is the official name of an algorithm suported
by snowball/3. The predicate is
semidetif Algorithm is given.