o
    7t¾i½  ã                   @   s    d Z dd„ Zdd„ Zdd„ ZdS )z;This code mirrors the utils of the original winogrande taskc                 C   s   dddœ}|| d  S )Né    é   )Ú1Ú2Úanswer© )ÚdocÚanswer_to_numr   r   úa/home/ubuntu/.local/lib/python3.10/site-packages/lm_eval/tasks/tinyBenchmarks/utils_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)Ú__doc__r
   r   r   r   r   r   r	   Ú<module>   s    