ó
    ´OÂf  ã                   ó   • S SK Jr  SS jrg)é    )ÚwordnetNc                 ó  ^• [        U 5      mUc  [        R                  " XS9nU(       a1  U Vs/ s H$  n[        UR	                  5       5      U:X  d  M"  UPM&     nnU(       d  g[        U4S jU 5       5      u  pgU$ s  snf )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.
:param str lang: WordNet language.
: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
N)Úlangc              3   ó”   >#   • U  H=  n[        TR                  UR                  5       R                  5       5      5      U4v •  M?     g 7f)N)ÚlenÚintersectionÚ
definitionÚsplit)Ú.0ÚssÚcontexts     €Ú*/usr/lib/python3/dist-packages/nltk/wsd.pyÚ	<genexpr>Úlesk.<locals>.<genexpr>0   s8   øé € ð ÚKRÀRŒˆW×!Ñ! "§-¡-£/×"7Ñ"7Ó"9Ó:Ó	;¸RÕ@Ê7ùs   ƒAA)Úsetr   ÚsynsetsÚstrÚposÚmax)	Úcontext_sentenceÚambiguous_wordr   r   r   r   Ú_Úsenser   s	           @r   Úleskr      sw   ø€ ô2 Ð"Ó#€GØ�Ü—/’/ .Ñ<ˆæ
Ù 'Ó@¢˜"¬3¨r¯v©v«x«=¸CÑ+?—2¡ˆÐ@æØäô ÙKRóó �H€Að €Lùò As   ¯!A=ÁA=)NNÚeng)Únltk.corpusr   r   © ó    r   Ú<module>r      s   ðõ  õ'r   