There are several algorithms available:
Providers that stems it’s input by various algorithms. By their nature they are not reversible.
If input value is a string a list with one string is returned, if it is an iterable, all elements in this iterable will be stemmed.
Usage Example:
>>> p = StemProvider()
>>> p.process(['Fish', 'fisher', 'fishing']) # Either a list of words...
['fish', 'fish', 'fish']
>>> p.process('stemming') # Or a single word.
'stem'
Stem the input values (either a single word or a list of words)
Uses the porter stemmer algorithm.
See here for a full list of languages:
Note
This does not depend on nltk, it depends on the pystemmer package.
Parameters: | language – language to use during stemming, defaults to english. |
---|