StemmerProtocol#

class scikitplot.corpus.StemmerProtocol(*args, **kwargs)[source]#

Structural protocol for word stemmers.

Examples

>>> class MyStemmer:
...     def stem(self, word: str) -> str:
...         return word.rstrip("ing")
>>> isinstance(MyStemmer(), StemmerProtocol)
True
stem(word)[source]#

Return the stem of word.

Parameters:
wordstr

Input word.

Returns:
str

Stemmed form.

Parameters:

word (str)

Return type:

str