+
    ÖÇÜhÝ>  ã                   ó  € R t ^ RIt^ RIHtHt ^ RIHt R t]P                  t
R tRt ^ RIHt ^ t Rt Rt  ! R	 R
]R7      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R4      tR#   ] d    R t LNi ; i)zÌ
Provides scoring functions for a number of association measures through a
generic, abstract implementation in ``NgramAssocMeasures``, and n-specific
``BigramAssocMeasures`` and ``TrigramAssocMeasures``.
N)ÚABCMetaÚabstractmethod©Úreducec                 ó.   € \         P                  ! V 4      # ©N)Ú_mathÚlog2)Úxs   &Ú:/usr/lib/python3/dist-packages/nltk/metrics/association.pyÚ<lambda>r      s   € ”%—*’*˜Q”-ó    c                 ó   € \        R  V 4      # )c                 ó   € W,          # r   © )r
   Úys   &&r   r   Ú<lambda>.<locals>.<lambda>   s   € ¨®r   r   )Úss   &r   r   r      s   € ”VÑ.°Ô2r   g#B’¡œÇ;)Úfisher_exactc                  ó   € \         hr   ©ÚNotImplementedError)Ú_argsÚ_kwargss   *,r   r   r      s   € Ü!Ð!r   c                   óì   a € ] tR t^-t o Rt^ t]]R 4       4       t]]R 4       4       t	]
R 4       t]R 4       t]
R 4       t]
R 4       t]R 4       t]
R	 4       t]
R
 4       t]
R 4       t]
R 4       tRtV tR# )ÚNgramAssocMeasuresa‹  
An abstract class defining a collection of generic association measures.
Each public method returns a score, taking the following arguments::

    score_fn(count_of_ngram,
             (count_of_n-1gram_1, ..., count_of_n-1gram_j),
             (count_of_n-2gram_1, ..., count_of_n-2gram_k),
             ...,
             (count_of_1gram_1, ..., count_of_1gram_n),
             count_of_total_words)

See ``BigramAssocMeasures`` and ``TrigramAssocMeasures``

Inheriting classes should define a property _n, and a method _contingency
which calculates contingency values from marginals in order for all
association measures defined here to be usable.
c                 ó   € \        R4      h)z>Calculates values of a contingency table from marginal values.ú?The contingency table is not availablein the general ngram caser   ©Ú	marginalss   *r   Ú_contingencyÚNgramAssocMeasures._contingencyB   ó   € ô "ØPó
ð 	
r   c                 ó   € \        R4      h)úACalculates values of contingency table marginals from its values.r   r   )Úcontingencys   *r   Ú
_marginalsÚNgramAssocMeasures._marginalsJ   r"   r   c              #  ó0  a aa"  € \        S4      p\        S P                  4       Uu. uF  p^V,          NK  	  pp\        \        S4      4       F;  o\	        V VV3R lV 4       4      VS P                  ^,
          ,          ,          x € K=  	  R# u upi 5i)ú3Calculates expected values for a contingency table.c              3   óˆ   <a"  € T F6  o\        VVV3R  l\        ^SP                  ,          4       4       4      x € K8  	  R# 5i)c              3   ób   <"  € T F$  qS,          SS,          8X  g   K  SV,          x € K&  	  R # 5ir   r   )Ú.0r
   ÚcontÚiÚjs   & €€€r   Ú	<genexpr>Ú@NgramAssocMeasures._expected_values.<locals>.<genexpr>.<genexpr>]   s(   øé € ÐPÑ)9 AÀ!½eÈÈQÍÑ=Oœ˜˜QŸšÓ)9ùs   ƒ/ž/N)ÚsumÚrangeÚ_n)r,   r/   Úclsr-   r.   s   &@€€€r   r0   Ú6NgramAssocMeasures._expected_values.<locals>.<genexpr>\   s3   ùé € ð á!˜ô ÖP¬¨q°#·&±&­yÔ)9ÓP×PÐPÛ!ùs   „>AN)r2   r3   r4   ÚlenÚ_product)r5   r-   Ún_allr.   Úbitss   ff ` r   Ú_expected_valuesÚ#NgramAssocMeasures._expected_valuesR   s€   úé € ô �D“	ˆÜ % c§f¡f¤Ó.¡˜1��Q—�¡ˆÐ.ô ”s˜4“yÖ!ˆAô ö á!óó ð ˜SŸV™V a�ZÕ(õ	*ôó "ùò /ùs   …#B¨BºABc                 ó@   € V \         ,          V \        ,          ,          # )z Scores ngrams by their frequency)ÚNGRAMÚTOTALr   s   *r   Úraw_freqÚNgramAssocMeasures.raw_freqc   s   € ð œÕ )¬EÕ"2Õ2Ð2r   c                óî   € V\         ,          \        V\        ,          4      V\        ,          V P                  ^,
          ,          ,          ,
          V\         ,          \
        ,           R,          ,          # )zqScores ngrams using Student's t test with independence hypothesis
for unigrams, as in Manning and Schutze 5.3.1.
g      à?)r>   r8   ÚUNIGRAMSr?   r4   Ú_SMALL©r5   r   s   &*r   Ú	student_tÚNgramAssocMeasures.student_th   sR   € ð ”eÕÜ�y¤Õ*Ó+¨y¼Õ/?ÀCÇFÁFÈQÅJÕ/OÕPõQà”uÕ¤Õ&¨3Õ.õ/ð 	/r   c                óz   € V P                   ! V!  pV P                  V4      p\        R \        W#4       4       4      # )zJScores ngrams using Pearson's chi-square as in Manning and Schutze
5.3.3.
c              3   óh   "  € T F(  w  rW,
          ^,          V\         ,           ,          x € K*  	  R# 5i)é   N)rD   ©r,   ÚobsÚexps   &  r   r0   Ú,NgramAssocMeasures.chi_sq.<locals>.<genexpr>y   s%   é € ÐUÁ_¹¸�C•I !Õ# s¬V¥|×4Ò4Ã_ùs   ‚02)r    r;   r2   Úzip)r5   r   r-   Úexpss   &*  r   Úchi_sqÚNgramAssocMeasures.chi_sqr   s9   € ð
 ×Ò Ñ+ˆØ×#Ñ# DÓ)ˆÜÑUÄSÈÄ_ÓUÓUÐUr   c                 ó€   € V \         ,          VP                  R^4      ,          \        V \        ,          4      ,          # )zªScores ngrams using a variant of mutual information. The keyword
argument power sets an exponent (default 3) for the numerator. No
logarithm of the result is calculated.
Úpower)r>   Úgetr8   rC   )r   Úkwargss   *,r   Úmi_likeÚNgramAssocMeasures.mi_like{   s5   € ð œÕ 6§:¡:¨g°qÓ#9Õ9¼HØ”hÕó=
õ 
ð 	
r   c                óÊ   € \        V\        ,          V\        ,          V P                  ^,
          ,          ,          4      \        \	        V\
        ,          4      4      ,
          # )zNScores ngrams by pointwise mutual information, as in Manning and
Schutze 5.4.
)Ú_log2r>   r?   r4   r8   rC   rE   s   &*r   ÚpmiÚNgramAssocMeasures.pmi…   sG   € ô
 �YœuÕ%¨	´%Õ(8¸S¿V¹VÀa½ZÕ(HÕHÓIÌEÜ�YœxÕ(Ó)óM
õ 
ð 	
r   c           
     ó„   € V P                   ! V!  p^\        R \        W P                  V4      4       4       4      ,          # )zFScores ngrams using likelihood ratios as in Manning and Schutze 5.3.4.c              3   ó‚   "  € T F5  w  rV\        W\        ,           ,          \        ,           4      ,          x € K7  	  R # 5ir   )Ú_lnrD   rK   s   &  r   r0   Ú6NgramAssocMeasures.likelihood_ratio.<locals>.<genexpr>’   s2   é € ð 
áA‘�ð ”#�c¤6�\Õ*¬VÕ3Ó4×4Ò4ÛAùs   ‚=?)r    r2   rO   r;   ©r5   r   r-   s   &* r   Úlikelihood_ratioÚ#NgramAssocMeasures.likelihood_ratioŽ   sE   € ð ×Ò Ñ+ˆØ”3ñ 
ä ×&:Ñ&:¸4Ó&@ÔAó
ó 
õ 
ð 	
r   c                óî   € \        V\        ,          4      V\        ,          V P                  ^,
          ,          ,          pV\        ,          \        V\        ,          V,          4      ^,
          ,          # )z1Scores ngrams using the Poisson-Stirling measure.)r8   rC   r?   r4   r>   rZ   )r5   r   rM   s   &* r   Úpoisson_stirlingÚ#NgramAssocMeasures.poisson_stirling—   sN   € ô �y¤Õ*Ó+¨y¼Õ/?ÀCÇFÁFÈQÅJÕ/OÕPˆØœÕ¤5¨´5Õ)9¸CÕ)?Ó#@À1Õ#DÕEÐEr   c                óZ   € V P                   ! V!  pV^ ,          \        VRR 4      ,          # )z&Scores ngrams using the Jaccard index.Néÿÿÿÿ)r    r2   ra   s   &* r   ÚjaccardÚNgramAssocMeasures.jaccard�   s-   € ð ×Ò Ñ+ˆØ�A�wœ˜T # 2˜Y›Õ'Ð'r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r4   Ústaticmethodr   r    r&   Úclassmethodr;   r@   rF   rQ   rW   r[   rb   re   ri   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r   -   sÿ   ø‡ € ñð$ 
€BàØñ
ó ó ð
ð Øñ
ó ó ð
ð ñó ðð  ñ3ó ð3ð ñ/ó ð/ð ñVó ðVð ñ
ó ð
ð ñ
ó ð
ð ñ
ó ð
ð ñFó ðFð
 ñ(ó ö(r   r   )Ú	metaclassc                   ó˜   a € ] tR t^¤t o Rt^t]R 4       t]R 4       t]R 4       t	]
R 4       t]
R 4       t]
R 4       t]R 4       tR	tV tR
# )ÚBigramAssocMeasuresa8  
A collection of bigram association measures. Each association measure
is provided as a function with three arguments::

    bigram_score_fn(n_ii, (n_ix, n_xi), n_xx)

The arguments constitute the marginals of a contingency table, counting
the occurrences of particular events in a corpus. The letter i in the
suffix refers to the appearance of the word in question, while x indicates
the appearance of any word. Thus, for example:

- n_ii counts ``(w1, w2)``, i.e. the bigram being scored
- n_ix counts ``(w1, *)``
- n_xi counts ``(*, w2)``
- n_xx counts ``(*, *)``, i.e. any bigram

This may be shown with respect to a contingency table::

            w1    ~w1
         ------ ------
     w2 | n_ii | n_oi | = n_xi
         ------ ------
    ~w2 | n_io | n_oo |
         ------ ------
         = n_ix        TOTAL = n_xx
c                ó\   € Vw  r4W@,
          pW0,
          pWWbV ,
          V,
          V,
          3# )zECalculates values of a bigram contingency table from marginal values.r   )Ún_iiÚn_ix_xi_tupleÚn_xxÚn_ixÚn_xiÚn_oiÚn_ios   &&&    r   r    Ú BigramAssocMeasures._contingencyÂ   s2   € ð %‰ˆØ�{ˆØ�{ˆØ˜D¨¥+°Õ"4°tÕ";Ð<Ð<r   c                óP   € WV ,           W ,           3W1,           V,           V ,           3# )r$   r   )rz   r   r€   Ún_oos   &&&&r   r&   ÚBigramAssocMeasures._marginalsÊ   s&   € ð ˜d•{ D¥KÐ0°$µ+ÀÕ2DÀtÕ2KÐLÐLr   c              #  óÔ   "  € \        V 4      p\        ^4       FI  pW,          W^,          ,          ,           W,          W^,          ,          ,           ,          V,          x € KK  	  R# 5i)r)   N)r2   r3   )r-   r|   r.   s   &  r   r;   Ú$BigramAssocMeasures._expected_valuesÏ   sH   é € ô �4‹yˆä�q–ˆAØ•7˜T a¥%�[Õ(¨T­W°tÀ½Eµ{Õ-BÕCÀdÕJÔJó ùs   ‚A&A(c                óÈ   € V P                   ! V!  w  r#rEW%,          W4,          ,
          ^,          W#,           W$,           ,          W5,           ,          WE,           ,          ,          # )zTScores bigrams using phi-square, the square of the Pearson correlation
coefficient.
)r    )r5   r   rz   r€   r   rƒ   s   &*    r   Úphi_sqÚBigramAssocMeasures.phi_sq×   sN   € ð
 "%×!1Ò!1°9Ñ!=Ñˆ�Dà•˜d�kÕ)¨aÕ/Ø�[˜T�[Õ)¨T­[Õ9¸T½[ÕIõ
ð 	
r   c                ó>   € Vw  rEW0P                  WV3V4      ,          # )zsScores bigrams using chi-square, i.e. phi-sq multiplied by the number
of bigrams, as in Manning and Schutze 5.3.3.
)rˆ   )r5   rz   r{   r|   r}   r~   s   &&&&  r   rQ   ÚBigramAssocMeasures.chi_sqâ   s#   € ð
 %‰ˆØ—j‘j ¨d |°TÓ:Õ:Ð:r   c                óR   € V P                   ! V!  w  r#rE\        W#.WE..RR7      w  rgV# )z¢Scores bigrams using Fisher's Exact Test (Pedersen 1996).  Less
sensitive to small counts than PMI or Chi Sq, but also more expensive
to compute. Requires scipy.
Úless)Úalternative)r    r   )r5   r   rz   r€   r   rƒ   ÚoddsÚpvalues   &*      r   ÚfisherÚBigramAssocMeasures.fisherê   s6   € ð "%×!1Ò!1°9Ñ!=Ñˆ�Dä%¨ |°d°\Ð&BÐPVÔW‰ˆØˆr   c                ó6   € Vw  r4^V ,          W4,           ,          # )z(Scores bigrams using Dice's coefficient.r   )rz   r{   r|   r}   r~   s   &&&  r   ÚdiceÚBigramAssocMeasures.diceö   s   € ð %‰ˆØ�4�x˜4�;Õ'Ð'r   r   N)rk   rl   rm   rn   ro   r4   rp   r    r&   r;   rq   rˆ   rQ   r‘   r”   rr   rs   rt   s   @r   rx   rx   ¤   sŸ   ø‡ € ñð6 
€Bàñ=ó ð=ð ñMó ðMð ñKó ðKð ñ
ó ð
ð ñ;ó ð;ð ñ	ó ð	ð ñ(ó ö(r   rx   c                   óH   a € ] tR t^ýt o Rt^t]R 4       t]R 4       tRt	V t
R# )ÚTrigramAssocMeasuresaŸ  
A collection of trigram association measures. Each association measure
is provided as a function with four arguments::

    trigram_score_fn(n_iii,
                     (n_iix, n_ixi, n_xii),
                     (n_ixx, n_xix, n_xxi),
                     n_xxx)

The arguments constitute the marginals of a contingency table, counting
the occurrences of particular events in a corpus. The letter i in the
suffix refers to the appearance of the word in question, while x indicates
the appearance of any word. Thus, for example:

- n_iii counts ``(w1, w2, w3)``, i.e. the trigram being scored
- n_ixx counts ``(w1, *, *)``
- n_xxx counts ``(*, *, *)``, i.e. any trigram
c                ó<  € Vw  rEpVw  rxp	W`,
          p
WP,
          pW@,
          pW�,
          V
,
          V,
          pW€,
          V
,
          V,
          pWp,
          V,
          V,
          pW0,
          V
,
          V,
          V,
          V,
          V,
          V,
          pW
W½WÎVV3# )z´Calculates values of a trigram contingency table (or cube) from
marginal values.
>>> TrigramAssocMeasures._contingency(1, (1, 1, 1), (1, 73, 1), 2000)
(1, 0, 0, 0, 0, 72, 0, 1927)
r   )Ún_iiiÚn_iix_tupleÚn_ixx_tupleÚn_xxxÚn_iixÚn_ixiÚn_xiiÚn_ixxÚn_xixÚn_xxiÚn_oiiÚn_ioiÚn_iioÚn_ooiÚn_oioÚn_iooÚn_ooos   &&&&             r   r    Ú!TrigramAssocMeasures._contingency  s–   € ð !,Ñˆ�uØ +Ñˆ�uØ•ˆØ•ˆØ•ˆØ• Õ%¨Õ-ˆØ• Õ%¨Õ-ˆØ• Õ%¨Õ-ˆØ• Õ%¨Õ-°Õ5¸Õ=ÀÕEÈÕMˆà˜e¨E¸%ÀÐGÐGr   c                 óÖ   € V w  rr4rVrxVW,           W,           W,           3W,           V,           V,           W,           V,           V,           W,           V,           V,           3\        V 4      3# )z£Calculates values of contingency table marginals from its values.
>>> TrigramAssocMeasures._marginals(1, 0, 0, 0, 0, 72, 0, 1927)
(1, (1, 1, 1), (1, 73, 1), 2000)
©r2   )	r%   r™   r£   r¤   r¦   r¥   r§   r¨   r©   s	   *        r   r&   ÚTrigramAssocMeasures._marginals&  sm   € ð BMÑ>ˆ�e E°%àØ�]˜E�M¨5­=Ð9à• Õ%¨Õ-Ø• Õ%¨Õ-Ø• Õ%¨Õ-ðô
 �Óð	
ð 		
r   r   N©rk   rl   rm   rn   ro   r4   rp   r    r&   rr   rs   rt   s   @r   r—   r—   ý   s9   ø‡ € ñð& 
€BàñHó ðHð$ ñ
ó ö
r   r—   c                   óH   a € ] tR tRt o Rt^t]R 4       t]R 4       tRt	V t
R# )ÚQuadgramAssocMeasuresi9  a
  
A collection of quadgram association measures. Each association measure
is provided as a function with five arguments::

    trigram_score_fn(n_iiii,
                    (n_iiix, n_iixi, n_ixii, n_xiii),
                    (n_iixx, n_ixix, n_ixxi, n_xixi, n_xxii, n_xiix),
                    (n_ixxx, n_xixx, n_xxix, n_xxxi),
                    n_all)

The arguments constitute the marginals of a contingency table, counting
the occurrences of particular events in a corpus. The letter i in the
suffix refers to the appearance of the word in question, while x indicates
the appearance of any word. Thus, for example:

- n_iiii counts ``(w1, w2, w3, w4)``, i.e. the quadgram being scored
- n_ixxi counts ``(w1, *, *, w4)``
- n_xxxx counts ``(*, *, *, *)``, i.e. any quadgram
c                óþ  € Vw  rVrxVw  ršr¼rÞVw  ppppW€,
          pWp,
          pW`,
          pWÐ,
          V,
          V,
          pWÀ,
          V,
          V,
          pW°,
          V,
          V,
          pVV ,
          V,
          V,
          V,
          V,
          V,
          V,
          pWP,
          pWà,
          V,
          V,
          pW ,
          V,
          V,
          pVV ,
          V,
          V,
          V,
          V,
          V,
          V,
          pW�,
          V,
          V,
          pVV ,
          V,
          V,
          V,
          V,
          V,
          V,
          pWð,
          V,
          V,
          V,
          V,
          V,
          V,
          p VV ,
          V,
          V,
          V,
          V,
          V,
          V,
          V,
          V,
          V,
          V,
          V,
          V,
          V,
          V ,
          p!V VVVVVVVVVVVVVV V!3# )zHCalculates values of a quadgram contingency table from
marginal values.
r   )"Ún_iiiiÚn_iiix_tupleÚn_iixx_tupleÚn_ixxx_tupleÚn_xxxxÚn_iiixÚn_iixiÚn_ixiiÚn_xiiiÚn_iixxÚn_ixixÚn_ixxiÚn_xixiÚn_xxiiÚn_xiixÚn_ixxxÚn_xixxÚn_xxixÚn_xxxiÚn_oiiiÚn_ioiiÚn_iioiÚn_ooiiÚn_oioiÚn_iooiÚn_oooiÚn_iiioÚn_oiioÚn_ioioÚn_ooioÚn_iiooÚn_oiooÚn_ioooÚn_oooos"   &&&&&                             r   r    Ú"QuadgramAssocMeasures._contingencyP  s  € ð
 ,8Ñ(ˆ˜Ø;GÑ8ˆ˜¨Ø+7Ñ(ˆ�˜ Ø•ˆØ•ˆØ•ˆØ• 6Õ)¨FÕ2ˆØ• 6Õ)¨FÕ2ˆØ• 6Õ)¨FÕ2ˆØ˜&• 6Õ)¨FÕ2°VÕ;¸fÕDÀvÕMÐPVÕVˆØ•ˆØ• 6Õ)¨FÕ2ˆØ• 6Õ)¨FÕ2ˆØ˜&• 6Õ)¨FÕ2°VÕ;¸fÕDÀvÕMÐPVÕVˆØ• 6Õ)¨FÕ2ˆØ˜&• 6Õ)¨FÕ2°VÕ;¸fÕDÀvÕMÐPVÕVˆØ• 6Õ)¨FÕ2°VÕ;¸fÕDÀvÕMÐPVÕVˆàØõàõð õð õ	ð
 õð õð õð õð õ	ð õ
ð õð õð õð õð õð 	ð( ØØØØØØØØØØØØØØØð!
ð 	
r   c                 ó@  € V w  ppppppppp	p
ppppppW,           pW,           pW,           pW,           pW,           V	,           V,           pW,           V	,           V,           pW,           V,           V,           pW,           V,           V,           pW,           V,           V,           pW,           V	,           V
,           pW,           V,           V	,           V,           V,           V,           V,           pW,           V,           V	,           V,           V
,           V,           V,           pW,           V,           V	,           V,           V,           V
,           V,           pW,           V,           V,           V,           V,           V,           V,           p\        V 4      pVVVVV3VVVVVV3VVVV3V3# )a  Calculates values of contingency table marginals from its values.
QuadgramAssocMeasures._marginals(1, 0, 2, 46, 552, 825, 2577, 34967, 1, 0, 2, 48, 7250, 9031, 28585, 356653)
(1, (2, 553, 3, 1), (7804, 6, 3132, 1378, 49, 2), (38970, 17660, 100, 38970), 440540)
r¬   ) r%   r²   rÅ   rÆ   rÈ   rÇ   rÉ   rÊ   rË   rÌ   rÍ   rÎ   rÏ   rÐ   rÑ   rÒ   rÓ   r·   r¸   r¹   rº   r»   r¼   r½   r¾   r¿   rÀ   rÁ   rÂ   rÃ   rÄ   r9   s    *                               r   r&   Ú QuadgramAssocMeasures._marginalsŒ  sœ  € ð. ñ#	
ØØØØØØØØØØØØØØØØð •ˆØ•ˆØ•ˆØ•ˆà• 6Õ)¨FÕ2ˆØ• 6Õ)¨FÕ2ˆØ• 6Õ)¨FÕ2ˆØ• 6Õ)¨FÕ2ˆØ• 6Õ)¨FÕ2ˆØ• 6Õ)¨FÕ2ˆà• 6Õ)¨FÕ2°VÕ;¸fÕDÀvÕMÐPVÕVˆØ• 6Õ)¨FÕ2°VÕ;¸fÕDÀvÕMÐPVÕVˆØ• 6Õ)¨FÕ2°VÕ;¸fÕDÀvÕMÐPVÕVˆØ• 6Õ)¨FÕ2°VÕ;¸fÕDÀvÕMÐPVÕVˆä�KÓ ˆð Ø�V˜V VÐ,Ø�V˜V V¨V°VÐ<Ø�V˜V VÐ,Øð
ð 	
r   r   Nr®   rt   s   @r   r°   r°   9  s8   ø‡ € ñð( 
€Bàñ9
ó ð9
ðv ñ1
ó ö1
r   r°   c                   ó:   a € ] tR tRt o RtR t]R 4       tRtV t	R# )ÚContingencyMeasuresiÁ  z…Wraps NgramAssocMeasures classes such that the arguments of association
measures are contingency table values rather than marginals.
c                ó2  € RVP                   P                  ,           V P                   n        \        V4       F[  pVP                  R4      '       d   K  \	        W4      pVP                  R4      '       g   V P                  W4      p\        WV4       K]  	  R# )zAConstructs a ContingencyMeasures given a NgramAssocMeasures classÚContingencyÚ__Ú_N)Ú	__class__rk   ÚdirÚ
startswithÚgetattrÚ_make_contingency_fnÚsetattr)ÚselfÚmeasuresÚkÚvs   &&  r   Ú__init__ÚContingencyMeasures.__init__Æ  sr   € à"/°(×2DÑ2D×2MÑ2MÕ"Mˆ�‰ÔÜ�X–ˆAØ�|‰|˜D×!Ò!ÙÜ˜Ó$ˆAØ—<‘< ×$Ò$Ø×-Ñ-¨hÓ:�Ü�D˜QÖó r   c                ó\   a a€ V V3R lpSP                   Vn         SP                  Vn        V# )zwFrom an association measure function, produces a new function which
accepts contingency table values as its arguments.
c                  ó,   <€ S! SP                   ! V !  !  # r   )r&   )r%   rä   Úold_fns   *€€r   ÚresÚ5ContingencyMeasures._make_contingency_fn.<locals>.res×  s   ø€ Ù˜8×.Ò.°Ñ<Ñ=Ð=r   )ro   rk   )rä   rë   rì   s   ff r   rá   Ú(ContingencyMeasures._make_contingency_fnÑ  s%   ù€ ö	>ð —n‘nˆŒØ—‘ˆŒØˆ
r   r   N)
rk   rl   rm   rn   ro   rç   rp   rá   rr   rs   rt   s   @r   rØ   rØ   Á  s#   ø‡ € ñò	 ð ñ
ó ö
r   rØ   éþÿÿÿrh   )ro   Úmathr   Úabcr   r   Ú	functoolsr   rZ   Úlogr_   r8   rD   Úscipy.statsr   ÚImportErrorr>   rC   r?   r   rx   r—   r°   rØ   r   r   r   Ú<module>rö      s­   ðñó ß 'Ý á€Ø‡i�i€á2€à	€ð"Ý(ð 	
€Ø )à€Ø 7à
€Ø 9ôt( 7õ t(ônV(Ð,ô V(ôr9
Ð-ô 9
ôxE
Ð.ô E
÷Pó øðM ô "ô"ð"ús   ªA2 Á2
A?Á>A?