o
    rZh                     @   s   d d Z dS )c                 C   s   ddd ddf }|g}t| |D ]Z\}}t|D ]Q\}\}}|| d }	||	krkddd	 |d
| D }
ddd	 ||d d
 D }| d|	 d| }||
dd
 dd| d d|d
d   qq|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       | ]}d | V  qdS z%s/%sN .0wr   r   E/var/www/auris/lib/python3.10/site-packages/nltk/tbl/erroranalysis.py	<genexpr>!       zerror_list.<locals>.<genexpr>Nc                 s   r   r   r   r   r   r   r
   r   "   r   /z->iz>25z |    )centerzip	enumeratejoinappend)Ztrain_sentsZ
test_sentshdrerrorsZ
train_sentZ	test_sentZwordnumwordZ	train_posZtest_posleftrightmidr   r   r
   
error_list   s"   
 2r   N)r   r   r   r   r
   <module>   s   