o
    7t¾iy  ã                   @   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   úb/home/ubuntu/.local/lib/python3.10/site-packages/lm_eval/tasks/winogrande/preprocess_winogrande.pyÚdoc_to_text   s   
r
   c                 C   s&   | d   d¡d }| d |d …  ¡ S )NÚsentenceÚ_r   )ÚindexÚstrip©r   Úidxr   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Úoptr   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    