Commit d75128dc authored by FarzanehNakhaee's avatar FarzanehNakhaee
Browse files

black update

parent dd584086
def qa4mre_process(doc): def qa4mre_process(doc):
return int(doc['correct_answer_id']) - 1 return int(doc["correct_answer_id"]) - 1
def doc_to_text(doc): def doc_to_text(doc):
return ( return "Sentence 1: {}\nSentence 2: {}\nQuestion: Is the word '{}' used in the same way in the" " two sentences above?\nAnswer:".format(
"Sentence 1: {}\nSentence 2: {}\nQuestion: Is the word '{}' used in the same way in the" doc["sentence1"],
" two sentences above?\nAnswer:".format( doc["sentence2"],
doc["sentence1"], doc["sentence1"][doc["start1"] : doc["end1"]],
doc["sentence2"],
doc["sentence1"][doc["start1"] : doc["end1"]],
)
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment