kwojtasik commited on
Commit
30113fd
1 Parent(s): bb6cd8c

Update poquad.py

Browse files
Files changed (1) hide show
  1. poquad.py +2 -1
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"]