djstrong commited on
Commit
2e86309
1 Parent(s): 25e1f63

Update poquad.py

Browse files
Files changed (1) hide show
  1. poquad.py +3 -0
poquad.py CHANGED
@@ -56,6 +56,7 @@ class SquadV2(datasets.GeneratorBasedBuilder):
56
  {
57
  "id": datasets.Value("string"),
58
  "title": datasets.Value("string"),
 
59
  "context": datasets.Value("string"),
60
  "question": datasets.Value("string"),
61
  "is_impossible": datasets.Value("bool"),
@@ -104,6 +105,7 @@ class SquadV2(datasets.GeneratorBasedBuilder):
104
  id_ = 0
105
  for example in squad["data"]:
106
  title = example.get("title", "")
 
107
  # paragraph_id = example["id"]
108
  for paragraph in example["paragraphs"]:
109
  context = paragraph["context"] # do not strip leading blank spaces GH-2585
@@ -129,6 +131,7 @@ class SquadV2(datasets.GeneratorBasedBuilder):
129
  yield str(id_), {
130
  "id": str(id_),
131
  "title": title,
 
132
  "context": context,
133
  "question": question,
134
  "is_impossible" : is_impossible,
 
56
  {
57
  "id": datasets.Value("string"),
58
  "title": datasets.Value("string"),
59
+ "summary": datasets.Value("string"),
60
  "context": datasets.Value("string"),
61
  "question": datasets.Value("string"),
62
  "is_impossible": datasets.Value("bool"),
 
105
  id_ = 0
106
  for example in squad["data"]:
107
  title = example.get("title", "")
108
+ summary = example.get("summary", "")
109
  # paragraph_id = example["id"]
110
  for paragraph in example["paragraphs"]:
111
  context = paragraph["context"] # do not strip leading blank spaces GH-2585
 
131
  yield str(id_), {
132
  "id": str(id_),
133
  "title": title,
134
+ "summary": summary,
135
  "context": context,
136
  "question": question,
137
  "is_impossible" : is_impossible,