a
     ˜ëj†  ã                   @   s   d d„ Z dS )c                 C   sÞ   ddd  d¡df }|g}t| |ƒD ]´\}}t|ƒD ]¢\}\}}|| d }	||	kr4d dd	„ |d
|… D ƒ¡}
d dd	„ ||d d
… D ƒ¡}|› d|	› d|› �}| |
dd
… d›d|  d¡› d|d
d… › �¡ q4q$|S )a  
    Returns a list of human-readable strings indicating the errors in the
    given tagging of the corpus.

    :param train_sents: The correct tagging of the corpus
    :type train_sents: list(tuple)
    :param test_sents: The tagged corpus
    :type test_sents: list(tuple)
    z]%25s | %s | %s
--------------------------+------------------------+--------------------------zleft contextzword/test->goldé   zright contexté   ú c                 s   s   | ]}d | V  qdS ©z%s/%sN© ©Ú.0Úwr   r   úU/mnt/bigstor/www/usecases/.venv/lib/python3.9/site-packages/nltk/tbl/erroranalysis.pyÚ	<genexpr>!   ó    zerror_list.<locals>.<genexpr>Nc                 s   s   | ]}d | V  qdS r   r   r   r   r   r	   r
   "   r   ú/z->içÿÿÿz>25z | é   )ÚcenterÚzipÚ	enumerateÚjoinÚappend)Ztrain_sentsZ
test_sentsÚhdrÚerrorsZ
train_sentZ	test_sentZwordnumÚwordZ	train_posZtest_posÚleftÚrightZmidr   r   r	   Ú
error_list   s    
ý 6r   N)r   r   r   r   r	   Ú<module>   r   