Update
Browse files- 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":
|
|
|
|
|
|
|
|
|
|
| 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":
|
|
|
|
|
|
|
|
|
|
| 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 |
"""
|