File size: 362 Bytes
a72f474 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
def doc_to_text(doc) -> str:
option_choices = {
"A": doc["ending0"],
"B": doc["ending1"],
"C": doc["ending2"],
"D": doc["ending3"],
}
answers = "".join((f"{k}. {v}\n") for k, v in option_choices.items())
return f"Question: {doc['sent1']}\n{answers}Answer:"
def doc_to_target(doc) -> int:
return doc["label"]
|