BayesTensor's picture
Upload folder using huggingface_hub
9d5b280 verified
raw
history blame contribute delete
178 Bytes
import re
def doc_to_choice(doc):
choices = [
c[4:].rstrip(" ,")
for c in re.findall(r"[abcd] \) .*?, |e \) .*?$", doc["options"])
]
return choices