LemmatizerProtocol#
- class scikitplot.corpus.LemmatizerProtocol(*args, **kwargs)[source]#
Structural protocol for word lemmatizers.
The
posparameter is optional context (part-of-speech tag). Implementations that do not useposcan ignore it.Examples
>>> class MyLemma: ... def lemmatize(self, word: str, pos: str = None) -> str: ... return word.lower() >>> isinstance(MyLemma(), LemmatizerProtocol) True