o
    6t¾iÁ  ã                   @   s   d d„ Z dd„ Zdd„ ZdS )c                 C   s   dddœ}|| d  S )Né    é   )Ú1Ú2Úanswer© )ÚdocÚanswer_to_numr   r   úl/home/ubuntu/.local/lib/python3.10/site-packages/lm_eval/tasks/icelandic_winogrande/preprocess_winogrande.pyÚdoc_to_text   s   
r
   c                 C   s:   | d   d¡d }| d |d …  ¡ }|dkrd| }|S )NÚsentenceÚ_r   Ú.ú )ÚindexÚstrip)r   ÚidxÚtargetr   r   r	   Údoc_to_target   s
   r   c                    s2   ˆ d   d¡‰ˆ d ˆ d g}‡ ‡fdd„|D ƒS )Nr   r   Úoption1Úoption2c                    s    g | ]}ˆ d  dˆ… | ‘qS )r   Nr   )Ú.0Úopt©r   r   r   r	   Ú
<listcomp>   s     z!doc_to_choice.<locals>.<listcomp>)r   )r   Úoptionsr   r   r	   Údoc_to_choice   s   r   N)r
   r   r   r   r   r   r	   Ú<module>   s    