saattrupdan commited on
Commit
7147e8d
1 Parent(s): b166062

fix: Make answers plural

Browse files
Files changed (1) hide show
  1. scandiqa.py +12 -12
scandiqa.py CHANGED
@@ -114,14 +114,14 @@ class ScandiQA(GeneratorBasedBuilder):
114
  {
115
  "example_id": Value("int64"),
116
  "question": Value("string"),
117
- "answer": {
118
- "text": Value("string"),
119
- "answer_start": Value("int64"),
120
  },
121
  "context": Value("string"),
122
- "answer_en": {
123
- "text": Value("string"),
124
- "answer_start": Value("int64"),
125
  },
126
  "context_en": Value("string"),
127
  "title_en": Value("string"),
@@ -166,14 +166,14 @@ class ScandiQA(GeneratorBasedBuilder):
166
  yield key, {
167
  "example_id": data["example_id"],
168
  "question": data["question"],
169
- "answer": {
170
- "text": data["answer"],
171
- "answer_start": data["answer_start"],
172
  },
173
  "context": data["context"],
174
- "answer_en": {
175
- "text": data["answer_en"],
176
- "answer_start": data["answer_start_en"],
177
  },
178
  "context_en": data["context_en"],
179
  "title_en": data["title_en"],
 
114
  {
115
  "example_id": Value("int64"),
116
  "question": Value("string"),
117
+ "answers": {
118
+ "text": [Value("string")],
119
+ "answer_start": [Value("int64")],
120
  },
121
  "context": Value("string"),
122
+ "answers_en": {
123
+ "text": [Value("string")],
124
+ "answer_start": [Value("int64")],
125
  },
126
  "context_en": Value("string"),
127
  "title_en": Value("string"),
 
166
  yield key, {
167
  "example_id": data["example_id"],
168
  "question": data["question"],
169
+ "answers": {
170
+ "text": [data["answer"]],
171
+ "answer_start": [data["answer_start"]],
172
  },
173
  "context": data["context"],
174
+ "answers_en": {
175
+ "text": [data["answer_en"]],
176
+ "answer_start": [data["answer_start_en"]],
177
  },
178
  "context_en": data["context_en"],
179
  "title_en": data["title_en"],