Datasets:
Update poquad.py
Browse files
poquad.py
CHANGED
@@ -108,7 +108,8 @@ class SquadV2(datasets.GeneratorBasedBuilder):
|
|
108 |
for qa in paragraph["qas"]:
|
109 |
question = qa["question"]
|
110 |
|
111 |
-
|
|
|
112 |
answer_starts = [answer["answer_start"] for answer in qa["answers"]]
|
113 |
answers = [answer["text"] for answer in qa["answers"]]
|
114 |
# is_impossible = qa["is_impossible"]
|
|
|
108 |
for qa in paragraph["qas"]:
|
109 |
question = qa["question"]
|
110 |
|
111 |
+
if "answers" not in qa:
|
112 |
+
continue
|
113 |
answer_starts = [answer["answer_start"] for answer in qa["answers"]]
|
114 |
answers = [answer["text"] for answer in qa["answers"]]
|
115 |
# is_impossible = qa["is_impossible"]
|