Datasets:
Update csatqa.py
Browse files
csatqa.py
CHANGED
@@ -60,16 +60,14 @@ class CSATQA(datasets.GeneratorBasedBuilder):
|
|
60 |
name=datasets.Split.TRAIN,
|
61 |
gen_kwargs={
|
62 |
"filepath": train_path,
|
63 |
-
"split": "train"
|
64 |
},
|
65 |
),
|
66 |
]
|
67 |
|
68 |
-
def _generate_examples(self, filepath
|
69 |
with open(filepath, encoding="utf-8") as f:
|
70 |
for key, row in enumerate(f):
|
71 |
data = json.loads(row)
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
yield key, data
|
|
|
60 |
name=datasets.Split.TRAIN,
|
61 |
gen_kwargs={
|
62 |
"filepath": train_path,
|
|
|
63 |
},
|
64 |
),
|
65 |
]
|
66 |
|
67 |
+
def _generate_examples(self, filepath):
|
68 |
with open(filepath, encoding="utf-8") as f:
|
69 |
for key, row in enumerate(f):
|
70 |
data = json.loads(row)
|
71 |
+
data["gold"] = int(data["gold"]) - 1
|
72 |
+
data.pop("split")
|
73 |
+
yield key, data
|
|