preprocess_qa4mre.py 164 Bytes
Newer Older
FarzanehNakhaee's avatar
FarzanehNakhaee committed
1
def qa4mre_process(doc):
FarzanehNakhaee's avatar
FarzanehNakhaee committed
2
    return int(doc["correct_answer_id"]) - 1
haileyschoelkopf's avatar
haileyschoelkopf committed
3
4
5
6


def doc_to_target(doc):
    return doc["answer_options"]["answer_str"][qa4mre_process(doc)]