peacock-data-public-datasets-idc-llm_eval
/
lm-evaluation
/build
/lib
/lm_eval
/tasks
/mathqa
/utils.py
import re | |
def doc_to_choice(doc): | |
choices = [ | |
c[4:].rstrip(" ,") | |
for c in re.findall(r"[abcd] \) .*?, |e \) .*?$", doc["options"]) | |
] | |
return choices | |