o
    MfT  ã                   @   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s!J ‚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   ©ÚhypÚrefÚlist_of_refsÚ
hypotheses© r   ú[/var/www/html/analyze/labelStudio/lib/python3.10/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s"J ‚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s#J ‚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   óh   g d¢} g d¢}g d¢}g d¢}g d¢}g d¢}|||g|gg}| |g}t ||ƒ}t|dƒdks2J ‚d S )	N©ÚItÚisÚaÚguideÚtoÚactionÚwhichÚensuresÚthatÚtheÚmilitaryÚalwaysÚobeysr   ÚcommandsÚofr   Úparty©r   r   r   r   r   r   r   r   r   r   r    ÚwillÚforeverÚheedÚPartyr#   ©r   r   r   ÚguidingÚ	principler   Ú
guaranteesr   r    Úforcesr!   ÚbeingÚunderr   Úcommandr$   r   r*   ©r   r   r   Ú	practicalr   Úforr   Úarmyr!   r   r)   r   Ú
directionsr$   r   r%   )ÚheÚreadr   ÚbookÚbecauser8   ÚwasÚ
interestedÚinÚworldÚhistory)r8   r<   r=   r>   r?   r@   r;   r8   r9   r   r:   é   g¾Á&S×?©r   Úround©	Úhyp1Úref1aÚref1bÚref1cÚhyp2Úref2ar   r   Úscorer   r   r   Ú
test_ribes-   s   
rL   c            	      C   r   )	Nr   r&   r+   r3   )r8   r9   r   )r8   r<   r=   r>   r?   r@   r;   r8   rA   g^KÈ=›Å?rB   rD   r   r   r   Útest_no_zero_divŸ   s   
rM   N)Únltk.translate.ribes_scorer   r   r   r   r   rL   rM   r   r   r   r   Ú<module>   s    r