brief-extractor/backend/venv/lib/python3.10/site-packages/nltk/stem/api.py
2026-03-06 18:42:46 +00:00

27 lines
714 B
Python
Executable file

# Natural Language Toolkit: Stemmer Interface
#
# Copyright (C) 2001-2024 NLTK Project
# Author: Trevor Cohn <tacohn@cs.mu.oz.au>
# Edward Loper <edloper@gmail.com>
# Steven Bird <stevenbird1@gmail.com>
# URL: <https://www.nltk.org/>
# For license information, see LICENSE.TXT
from abc import ABCMeta, abstractmethod
class StemmerI(metaclass=ABCMeta):
"""
A processing interface for removing morphological affixes from
words. This process is known as stemming.
"""
@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
"""