"""Stem text using the Porter stemmer."""__author__='Paul Landes'fromdataclassesimportdataclass,fieldimportloggingfromnltk.stemimportPorterStemmerfromzensols.nlpimportTokenMapperlogger=logging.getLogger(__name__)
[docs]@dataclassclassPorterStemmerTokenMapper(TokenMapper):"""Use the Porter Stemmer from the NTLK to stem as normalized tokens. """stemmer:PorterStemmer=field(default_factory=PorterStemmer)