+
    ÖÇÜhQ  ã                   ó&   € R t R tR tR tRR ltR# )z#
Tools for comparing ranked lists.
c              #  ó¤   "  € \        V 4      p \        V4      pV  F  p W V,          W,          ,
          3x € K  	  R#   \         d     K1  i ; i5i)z¬Finds the difference between the values in ranks1 and ranks2 for keys
present in both dicts. If the arguments are not dicts, they are converted
from (key, rank) sequences.
N)ÚdictÚKeyError)Úranks1Úranks2Úks   && Ú7/usr/lib/python3/dist-packages/nltk/metrics/spearman.pyÚ_rank_distsr	      sO   é € ô
 �&‹\€FÜ�&‹\€FÛˆð	Ø˜A•Y ¥Õ*Ð*Ô*ó øô ô 	Úð	üs%   ‚AŸ>¸A¾AÁ	AÁAÁAc                óÞ   € ^ p^ p\        W4       F  w  rEW5V,          ,          pV^,          pK  	   ^^V,          W"V,          ^,
          ,          ,          ,
          #   \         d     R# i ; i)aE  Returns the Spearman correlation coefficient for two rankings, which
should be dicts or sequences of (key, rank). The coefficient ranges from
-1.0 (ranks are opposite) to 1.0 (ranks are identical), and is only
calculated for keys in both rankings (for meaningful results, remove keys
present in only one list before ranking).g        )r	   ÚZeroDivisionError)r   r   ÚnÚresr   Úds   &&    r   Úspearman_correlationr      sh   € ð 	
€AØ
€CÜ˜FÖ+‰ˆØ�1�u�ˆØ	ˆQ�Šñ ,ðØ�A˜•G˜q¨¥E¨A¥I�Õ/Õ0Ð0øÜô âðús   ²*A ÁA,Á+A,c                ó&   € R \        V 4       4       # )z|Given a sequence, yields each element with an increasing rank, suitable
for use as an argument to ``spearman_correlation``.
c              3   ó,   "  € T F
  w  rW!3x € K  	  R # 5i)N© )Ú.0Úir   s   &  r   Ú	<genexpr>Ú&ranks_from_sequence.<locals>.<genexpr>1   s   é € Ð.™~‘t�qˆQ�F›~ùs   ‚)Ú	enumerate)Úseqs   &r   Úranks_from_sequencer   -   s   € ñ /œy¨œ~Ó.Ð.ó    c              #  ó¦   "  € Rp^ p\        V 4       F(  w  pw  rV \        Wb,
          4      V8”  d   TpYS3x € TpK*  	  R#   \         d     Li ; i5i)zìGiven a sequence of (key, score) tuples, yields each key with an
increasing rank, tying with previous key's rank if the difference between
their scores is less than rank_gap. Suitable for use as an argument to
``spearman_correlation``.
N)r   ÚabsÚ	TypeError)ÚscoresÚrank_gapÚ
prev_scoreÚrankr   ÚkeyÚscores   &&     r   Úranks_from_scoresr$   4   sa   é € ð €JØ€DÜ$ VÖ,‰ˆ‰<ˆCð	Ü�5Õ%Ó&¨Ô1Ø�ð ˆiŠØŠ
ó -øô ô 	Ùð	üs'   ‚A›A ³AÁ AÁAÁAÁAN)gVçž¯Ò<)Ú__doc__r	   r   r   r$   r   r   r   Ú<module>r&      s   ðñò
òò$/ör   