File: //usr/lib/python3/dist-packages/sphinx/util/stemmer/__pycache__/__init__.cpython-310.pyc
o
$�a# � @ s~ d Z ddlmZ z
ddlmZ dZW n ey dZY nw G dd� d�ZG dd � d e�ZG d
d� dee�Z defd
d�Z
dS )z�
sphinx.util.stemmer
~~~~~~~~~~~~~~~~~~~
Word stemming utilities for Sphinx.
:copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� )�
PorterStemmer)�StemmerTFc @ s e Zd Zdedefdd�ZdS )�BaseStemmer�word�returnc C s t � ��N)�NotImplementedError��selfr � r �>/usr/lib/python3/dist-packages/sphinx/util/stemmer/__init__.py�stem s zBaseStemmer.stemN)�__name__�
__module__�__qualname__�strr
r r r r r s r c @ s( e Zd Zddd�Zdedefdd�ZdS ) � PyStemmerr Nc C s t d�| _d S )N�porter)�
_PyStemmer�stemmer)r
r r r �__init__ s zPyStemmer.__init__r c C s | j �|�S r )r �stemWordr r r r r
s zPyStemmer.stem)r N)r r r r r r
r r r r r s
r c s* e Zd ZdZdedef� fdd�Z� ZS )�StandardStemmerzdAll those porter stemmer implementations look hideous;
make at least the stem method nicer.
r r c s t � �|dt|�d �S )Nr � )�superr
�lenr �� __class__r r r
% s zStandardStemmer.stem)r r r �__doc__r r
�
__classcell__r r r r r ! s r r c C s t rt� S t� S r )� PYSTEMMERr r r r r r �get_stemmer) s r! N)r �sphinx.util.stemmer.porterr r r r �ImportErrorr r r r! r r r r �<module> s
�