
    gD                          G d  d      Z y)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y)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

    c                 4    ddl m} |j                  |||      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        F/var/www/openai/venv/lib/python3.12/site-packages/nltk/stem/wordnet.pyr	   zWordNetLemmatizer._morphy   s     	.zz$%566    Nc                 4    ddl m} |j                  |||      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5r   wordr   returnc                 P    | j                  ||      }|rt        |t              S |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<   s(    2 dC('-s6s#747r   c                      y)Nz<WordNetLemmatizer> )r   s    r   __repr__zWordNetLemmatizer.__repr__X   s    $r   )T)NT)n)	__name__
__module____qualname____doc__r	   r   strr   r   r   r   r   r   r      s0    $76"8c 8 8c 88%r   r   N)r   r   r   r   <module>r%      s   N% N%r   