o
    rZŽh^  ã                   @   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   ©ZhypÚrefÚlist_of_refsÚ
hypotheses© r   úH/var/www/auris/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ÚalwaysZobeysr   ÚcommandsÚofr   Úparty©r   r   r   r   r   r   r   r   r   r   r   ZwillÚforeverÚheedÚPartyr!   ©r   r   r   ZguidingZ	principler   Z
guaranteesr   r   Zforcesr    ZbeingZunderr   Ú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,   r0   r1   r2   r3   r4   r/   r,   r-   r   r.   é   g¾Á&S×?©r   Úround©	Zhyp1Zref1aZref1bZref1cZhyp2Zref2ar
   r   Zscorer   r   r   Ú
test_ribes-   s   
r9   c            	      C   r   )	Nr   r$   r(   r*   )r,   r-   r   )r,   r0   r1   r2   r3   r4   r/   r,   r5   g^KÈ=›Å?r6   r8   r   r   r   Útest_no_zero_divŸ   s   
r:   N)Znltk.translate.ribes_scorer   r   r   r   r   r9   r:   r   r   r   r   Ú<module>   s    r