ó
ů`]c           @  sl   d  d l  m Z d  d l m Z d  d l m Z d  d l m Z e d e f d     Y Z	 d d  Z d S(	   i˙˙˙˙(   t   unicode_literals(   t   NOUN(   t   wordnet(   t   python_2_unicode_compatiblet   WordNetLemmatizerc           B  s,   e  Z d  Z d   Z e d  Z d   Z RS(   u  
    WordNet Lemmatizer

    Lemmatize using WordNet's built-in morphy function.
    Returns the input word unchanged if it cannot be found in WordNet.

        >>> from nltk.stem import WordNetLemmatizer
        >>> wnl = WordNetLemmatizer()
        >>> 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
    c         C  s   d  S(   N(    (   t   self(    (    s0   lib/python2.7/site-packages/nltk/stem/wordnet.pyt   __init__%   s    c         C  s,   t  j | |  } | r( t | d t S| S(   Nt   key(   R   t   _morphyt   mint   len(   R   t   wordt   post   lemmas(    (    s0   lib/python2.7/site-packages/nltk/stem/wordnet.pyt	   lemmatize(   s    c         C  s   d S(   Nu   <WordNetLemmatizer>(    (   R   (    (    s0   lib/python2.7/site-packages/nltk/stem/wordnet.pyt   __repr__,   s    (   t   __name__t
   __module__t   __doc__R   R   R   R   (    (    (    s0   lib/python2.7/site-packages/nltk/stem/wordnet.pyR      s   	c         C  s   d d l  m } | j   d  S(   Ni˙˙˙˙(   R   (   t   nltk.corpusR   t   _unload(   t   moduleR   (    (    s0   lib/python2.7/site-packages/nltk/stem/wordnet.pyt   teardown_module1   s    N(   t
   __future__R    t   nltk.corpus.reader.wordnetR   R   R   t   nltk.compatR   t   objectR   t   NoneR   (    (    (    s0   lib/python2.7/site-packages/nltk/stem/wordnet.pyt   <module>   s   !