
    NgD                           G d  d          Z dS )c                   >    e Zd ZdZddZddZddeded	efd
Zd ZdS )WordNetLemmatizera  
    WordNet Lemmatizer

    Provides 3 lemmatizer modes: _morphy(), morphy() and lemmatize().

    lemmatize() is a permissive wrapper around _morphy().
    It returns the shortest lemma found in WordNet,
    or the input string unchanged if nothing is found.

    >>> from nltk.stem import WordNetLemmatizer as wnl
    >>> print(wnl().lemmatize('us', 'n'))
    u

    >>> print(wnl().lemmatize('Anythinggoeszxcv'))
    Anythinggoeszxcv

    Tc                 <    ddl m} |                    |||          S )z
        _morphy() is WordNet's _morphy lemmatizer.
        It returns a list of all lemmas found in WordNet.

        >>> from nltk.stem import WordNetLemmatizer as wnl
        >>> print(wnl()._morphy('us', 'n'))
        ['us', 'u']
            wordnet)nltk.corpusr   _morphyselfformposcheck_exceptionswns        M/var/www/html/ai-engine/env/lib/python3.11/site-packages/nltk/stem/wordnet.pyr	   zWordNetLemmatizer._morphy   s-     	.-----zz$%5666    Nc                 <    ddl m} |                    |||          S )aI  
        morphy() is a restrictive wrapper around _morphy().
        It returns the first lemma found in WordNet,
        or None if no lemma is found.

        >>> from nltk.stem import WordNetLemmatizer as wnl
        >>> print(wnl().morphy('us', 'n'))
        us

        >>> print(wnl().morphy('catss'))
        None
        r   r   )r   r   morphyr
   s        r   r   zWordNetLemmatizer.morphy+   s-     	.-----yys$4555r   nwordr   returnc                 b    |                      ||          }|rt          |t                    n|S )a  Lemmatize `word` by picking the shortest of the possible lemmas,
        using the wordnet corpus reader's built-in _morphy function.
        Returns the input word unchanged if it cannot be found in WordNet.

        >>> from nltk.stem import WordNetLemmatizer as wnl
        >>> print(wnl().lemmatize('dogs'))
        dog
        >>> print(wnl().lemmatize('churches'))
        church
        >>> print(wnl().lemmatize('aardwolves'))
        aardwolf
        >>> print(wnl().lemmatize('abaci'))
        abacus
        >>> print(wnl().lemmatize('hardrock'))
        hardrock

        :param word: The input word to lemmatize.
        :type word: str
        :param pos: The Part Of Speech tag. Valid options are `"n"` for nouns,
            `"v"` for verbs, `"a"` for adjectives, `"r"` for adverbs and `"s"`
            for satellite adjectives.
        :type pos: str
        :return: The shortest lemma of `word`, for the given `pos`.
        )key)r	   minlen)r   r   r   lemmass       r   	lemmatizezWordNetLemmatizer.lemmatize<   s4    2 dC(('-7s6s####47r   c                     dS )Nz<WordNetLemmatizer> )r   s    r   __repr__zWordNetLemmatizer.__repr__X   s    $$r   )T)NT)r   )	__name__
__module____qualname____doc__r	   r   strr   r   r   r   r   r   r      s         $7 7 7 76 6 6 6"8 8c 8 8c 8 8 8 88% % % % %r   r   N)r   r   r   r   <module>r%      sA   N% N% N% N% N% N% N% N% N% N%r   