
    Ng                         d  Z dS )c                    dddd                     d          ddd}|g}t          | |          D ]\  }}t          |          D ]\  }\  }}||         d         }	||	k    rd	                    d
 |d|         D                       }
d	                    d ||dz   d         D                       }| d|	 d| }|                    |
dd         dd|                     d           d|dd                     |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left contextz>25z | zword/test->gold   zright contextzO
--------------------------+------------------------+--------------------------    c              3       K   | ]	}d |z  V  
dS z%s/%sN .0ws     R/var/www/html/ai-engine/env/lib/python3.11/site-packages/nltk/tbl/erroranalysis.py	<genexpr>zerror_list.<locals>.<genexpr>!   s&      JJ!JJJJJJ    Nc              3       K   | ]	}d |z  V  
dS r   r   r	   s     r   r   zerror_list.<locals>.<genexpr>"   s&       P P1 P P P P P Pr   /z->i   )centerzip	enumeratejoinappend)train_sents
test_sentshdrerrors
train_sent	test_sentwordnumword	train_postest_posleftrightmids                r   
error_listr$      s\    	  $$$$C
 UF!$[*!=!= U U
I*3J*?*? 	U 	U&G&dI )!,HH$$xxJJZ5IJJJJJ P Pj16O P P PPP7777I77cddSSSCJJrNNSSuSbSzSSTTT	U Mr   N)r$   r   r   r   <module>r%      s       r   