Source code for nltk.stem.api

# Natural Language Toolkit: Stemmer Interface
# Copyright (C) 2001-2022 NLTK Project
# Author: Trevor Cohn <>
#         Edward Loper <>
#         Steven Bird <>
# URL: <>
# For license information, see LICENSE.TXT

from abc import ABCMeta, abstractmethod

[docs]class StemmerI(metaclass=ABCMeta): """ A processing interface for removing morphological affixes from words. This process is known as stemming. """
[docs] @abstractmethod def stem(self, token): """ Strip affixes from the token and return the stem. :param token: The token that should be stemmed. :type token: str """