mathiascreutz
commited on
Commit
·
39b57bd
1
Parent(s):
be906a3
Testing configs
Browse files- opusparcus.py +8 -7
opusparcus.py
CHANGED
@@ -168,11 +168,12 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
|
|
168 |
with open(filepath, encoding="utf-8") as f:
|
169 |
for id_, row in enumerate(f):
|
170 |
data = json.loads(row)
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
178 |
|
|
|
168 |
with open(filepath, encoding="utf-8") as f:
|
169 |
for id_, row in enumerate(f):
|
170 |
data = json.loads(row)
|
171 |
+
if data["lang"] == lang:
|
172 |
+
yield id_, {
|
173 |
+
"lang": data["lang"],
|
174 |
+
"sent1": data["sent1"],
|
175 |
+
"sent2": data["sent2"],
|
176 |
+
"annot_score": data["annot_score"],
|
177 |
+
"gem_id": data["gem_id"]
|
178 |
+
}
|
179 |
|