Datasets:
saattrupdan
commited on
Merge branch 'main' of https://huggingface.co/datasets/alexandrainst/scandiqa
Browse files- README.md +1 -1
- scandiqa.py +2 -2
README.md
CHANGED
@@ -93,7 +93,7 @@ An example from the `train` split of the `da` subset looks as follows.
|
|
93 |
'context': 'Dette er en testkontekst.',
|
94 |
'answer_en': 'This is a test',
|
95 |
'answer_start_en': 0,
|
96 |
-
'context_en': "This is a test",
|
97 |
'title_en': 'Train test'
|
98 |
}
|
99 |
```
|
|
|
93 |
'context': 'Dette er en testkontekst.',
|
94 |
'answer_en': 'This is a test',
|
95 |
'answer_start_en': 0,
|
96 |
+
'context_en': "This is a test context.",
|
97 |
'title_en': 'Train test'
|
98 |
}
|
99 |
```
|
scandiqa.py
CHANGED
@@ -112,7 +112,7 @@ class ScandiQA(GeneratorBasedBuilder):
|
|
112 |
def _info(self) -> DatasetInfo:
|
113 |
features = Features(
|
114 |
{
|
115 |
-
"id": Value("
|
116 |
"question": Value("string"),
|
117 |
"answers": {
|
118 |
"text": [Value("string")],
|
@@ -167,7 +167,7 @@ class ScandiQA(GeneratorBasedBuilder):
|
|
167 |
for key, row in enumerate(f):
|
168 |
data = json.loads(row)
|
169 |
yield key, {
|
170 |
-
"id": data["id"],
|
171 |
"question": data["question"],
|
172 |
"answers": {
|
173 |
"text": [data["answer"]],
|
|
|
112 |
def _info(self) -> DatasetInfo:
|
113 |
features = Features(
|
114 |
{
|
115 |
+
"id": Value("string"),
|
116 |
"question": Value("string"),
|
117 |
"answers": {
|
118 |
"text": [Value("string")],
|
|
|
167 |
for key, row in enumerate(f):
|
168 |
data = json.loads(row)
|
169 |
yield key, {
|
170 |
+
"id": str(data["id"]),
|
171 |
"question": data["question"],
|
172 |
"answers": {
|
173 |
"text": [data["answer"]],
|