Serhii commited on
Commit
f513fe7
·
1 Parent(s): a70d1e9
Files changed (1) hide show
  1. Custom_SQuAD.py +12 -2
Custom_SQuAD.py CHANGED
@@ -79,8 +79,13 @@ class ShellcodeIA32(datasets.GeneratorBasedBuilder):
79
  features = datasets.Features(
80
  {
81
  "id": datasets.Value("string"),
 
 
82
  "question": datasets.Value("string"),
83
- "answers": datasets.Sequence(datasets.Value("string"))
 
 
 
84
  }
85
  )
86
 
@@ -172,8 +177,13 @@ class ShellcodeIA32(datasets.GeneratorBasedBuilder):
172
  for idx, row in data.iterrows():
173
  yield idx, {
174
  "id": row["id"],
 
 
175
  "question": row["question"],
176
- "answers": row["answers"]["text"]
 
 
 
177
  }
178
 
179
  """
 
79
  features = datasets.Features(
80
  {
81
  "id": datasets.Value("string"),
82
+ "title": datasets.Value("string"),
83
+ "context": datasets.Value("string"),
84
  "question": datasets.Value("string"),
85
+ "answers": {
86
+ "text": datasets.Sequence(datasets.Value("string")),
87
+ "answer_start": datasets.Sequence(datasets.Value("int32"))
88
+ }
89
  }
90
  )
91
 
 
177
  for idx, row in data.iterrows():
178
  yield idx, {
179
  "id": row["id"],
180
+ "title": "",
181
+ "context": "",
182
  "question": row["question"],
183
+ "answers": {
184
+ "text": row["answers"]["text"],
185
+ "answer_start": [0]
186
+ }
187
  }
188
 
189
  """