a
    ±KbT  ã                   @   s<   d dl mZmZ dd„ Zdd„ Zdd„ Zdd	„ Zd
d„ ZdS )é    )Úcorpus_ribesÚword_rank_alignmentc                  C   sF   d  ¡ } d  ¡ }t|| ƒg ks"J ‚|gg}| g}t||ƒdksBJ ‚d S )Nú*This is a nice sentence which I quite likez;Okay well that's neat and all but the reference's differentç        ©Úsplitr   r   ©ZhypÚrefÚlist_of_refsÚ
hypotheses© r   ú8lib/python3.9/site-packages/nltk/test/unit/test_ribes.pyÚtest_ribes_empty_worder   s    r   c                  C   sH   d  ¡ } d  ¡ }t|| ƒdgks$J ‚|gg}| g}t||ƒdksDJ ‚d S )Nr   z;Okay well that's nice and all but the reference's differenté   r   r   r   r   r   r   Útest_ribes_one_worder   s    r   c                  C   sJ   d  ¡ } d  ¡ }t|| ƒddgks&J ‚|gg}| g}t||ƒdksFJ ‚d S )Nr   z<Okay well that's nice and all but the reference is differenté	   r   r   r   r   r   r   r   Útest_ribes_two_worder   s    r   c            	      C   sh   g d¢} g d¢}g d¢}g d¢}g d¢}g d¢}|||g|gg}| |g}t ||ƒ}t|dƒdksdJ ‚d S )	N©ÚItÚisÚaÚguideÚtoÚactionÚwhichÚensuresÚthatÚtheÚmilitaryÚalwaysZobeysr   ÚcommandsÚofr   Úparty©r   r   r   r   r   r   r   r   r   r   r   ZwillZforeverÚheedÚPartyr    ©r   r   r   ZguidingZ	principler   Z
guaranteesr   r   Zforcesr   ZbeingZunderr   Zcommandr!   r   r%   ©r   r   r   Z	practicalr   Úforr   Zarmyr   r   r$   r   Z
directionsr!   r   r"   )ÚheÚreadr   ÚbookÚbecauser)   ÚwasÚ
interestedÚinÚworldÚhistory)r)   r-   r.   r/   r0   r1   r,   r)   r*   r   r+   é   g¾Á&S×?©r   Úround©	Zhyp1Zref1aZref1bZref1cZhyp2Zref2ar
   r   Zscorer   r   r   Ú
test_ribes-   s    
r6   c            	      C   sh   g d¢} g d¢}g d¢}g d¢}g d¢}g d¢}|||g|gg}| |g}t ||ƒ}t|dƒdksdJ ‚d S )	Nr   r#   r&   r'   )r)   r*   r   )r)   r-   r.   r/   r0   r1   r,   r)   r2   g^KÈ=›Å?r3   r5   r   r   r   Útest_no_zero_divŸ   s    
r7   N)Znltk.translate.ribes_scorer   r   r   r   r   r6   r7   r   r   r   r   Ú<module>   s
   r