§
    'ê[fý  ã                   ó   — d dl mZ dd„ZdS )é    )ÚwordnetNc                 ó¸   ‡‡— t          | ¦  «        Š|€t          j        |¦  «        }‰rˆfd„|D ¦   «         }|sdS t          ˆfd„|D ¦   «         ¦  «        \  }}|S )aÝ  Return a synset for an ambiguous word in a context.

    :param iter context_sentence: The context sentence where the ambiguous word
         occurs, passed as an iterable of words.
    :param str ambiguous_word: The ambiguous word that requires WSD.
    :param str pos: A specified Part-of-Speech (POS).
    :param iter synsets: Possible synsets of the ambiguous word.
    :return: ``lesk_sense`` The Synset() object with the highest signature overlaps.

    This function is an implementation of the original Lesk algorithm (1986) [1].

    Usage example::

        >>> lesk(['I', 'went', 'to', 'the', 'bank', 'to', 'deposit', 'money', '.'], 'bank', 'n')
        Synset('savings_bank.n.02')

    [1] Lesk, Michael. "Automatic sense disambiguation using machine
    readable dictionaries: how to tell a pine cone from an ice cream
    cone." Proceedings of the 5th Annual International Conference on
    Systems Documentation. ACM, 1986.
    https://dl.acm.org/citation.cfm?id=318728
    Nc                 ó^   •— g | ])}t          |                     ¦   «         ¦  «        ‰k    ¯'|‘Œ*S © )ÚstrÚpos)Ú.0Ússr   s     €ú</var/www/piapp/venv/lib/python3.11/site-packages/nltk/wsd.pyú
<listcomp>zlesk.<locals>.<listcomp>*   s1   ø€ Ð@Ð@Ð@˜"­3¨r¯vªv©x¬x©=¬=¸CÒ+?Ð+?�2Ð+?Ð+?Ð+?ó    c              3   ó¨   •K  — | ]L}t          ‰                     |                     ¦   «                              ¦   «         ¦  «        ¦  «        |fV — ŒMd S )N)ÚlenÚintersectionÚ
definitionÚsplit)r	   r
   Úcontexts     €r   ú	<genexpr>zlesk.<locals>.<genexpr>/   sc   øè è € ð ð ØEG�ˆW×!Ò! "§-¢-¡/¤/×"7Ò"7Ñ"9Ô"9Ñ:Ô:Ñ	;Ô	;¸RÐ@ðð ð ð ð ð r   )Úsetr   ÚsynsetsÚmax)Úcontext_sentenceÚambiguous_wordr   r   Ú_Úsenser   s     `   @r   Úleskr      s—   øø€ õ0 Ð"Ñ#Ô#€GØ€Ý”/ .Ñ1Ô1ˆà
ð AØ@Ð@Ð@Ð@ Ð@Ñ@Ô@ˆàð Øˆtåð ð ð ð ØKRðñ ô ñ ô �H€A€uð €Lr   )NN)Únltk.corpusr   r   r   r   r   ú<module>r      s7   ðð  Ð Ð Ð Ð Ð ð&ð &ð &ð &ð &ð &r   