a
     ˜ëjÚ  ã                   @   s*   d dl Z d dlmZ G dd„ de jƒZdS )é    N)Úmeteor_scorec                   @   s<   e Zd Zg d¢ddggZg d¢Zdd„ Zdd„ Zd	d
„ ZdS )Ú
TestMETEOR)ÚthisÚisÚaÚtestr   Zistest)ZTHISÚIsr   ZtESTc                 C   s$   t | j| jtjd�}|dks J ‚d S )N)Ú
preprocessg     Àï?)r   Ú	referenceÚ	candidateÚstrÚlower)ÚselfZscore© r   úc/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/nltk/test/unit/translate/test_meteor.pyÚtest_meteor
   s    zTestMETEOR.test_meteorc                 C   s&   dd„ | j D ƒ}|  tt|| j¡ d S )Nc                 S   s   g | ]}d   |¡‘qS )ú )Újoin)Ú.0Úrefr   r   r   Ú
<listcomp>   ó    z8TestMETEOR.test_reference_type_check.<locals>.<listcomp>)r
   ÚassertRaisesÚ	TypeErrorr   r   )r   Zstr_referencer   r   r   Útest_reference_type_check   s    z$TestMETEOR.test_reference_type_checkc                 C   s"   d  | j¡}|  tt| j|¡ d S )Nr   )r   r   r   r   r   r
   )r   Zstr_candidater   r   r   Útest_candidate_type_check   s    z$TestMETEOR.test_candidate_type_checkN)Ú__name__Ú
__module__Ú__qualname__r
   r   r   r   r   r   r   r   r   r      s
   r   )ZunittestZnltk.translate.meteor_scorer   ZTestCaser   r   r   r   r   Ú<module>   s   