Update NCR.py
Browse files
NCR.py
CHANGED
|
@@ -105,11 +105,11 @@ class NCR(datasets.GeneratorBasedBuilder):
|
|
| 105 |
questions = single_data["Questions"]
|
| 106 |
for i in range(len(questions)):
|
| 107 |
question = questions[i]
|
| 108 |
-
|
| 109 |
yield f"{article_idx}_{i}", {
|
| 110 |
-
"example_id": single_data["
|
| 111 |
"article": single_data["Content"],
|
| 112 |
"question": question["Question"],
|
| 113 |
"answer": question["Answer"],
|
| 114 |
-
"options":
|
| 115 |
}
|
|
|
|
| 105 |
questions = single_data["Questions"]
|
| 106 |
for i in range(len(questions)):
|
| 107 |
question = questions[i]
|
| 108 |
+
options = [i.replace("A.","").replace("B.","").replace("C.","").replace("D.","").strip() for i in question["Choices"]]
|
| 109 |
yield f"{article_idx}_{i}", {
|
| 110 |
+
"example_id": single_data["Id"],
|
| 111 |
"article": single_data["Content"],
|
| 112 |
"question": question["Question"],
|
| 113 |
"answer": question["Answer"],
|
| 114 |
+
"options": options,
|
| 115 |
}
|