mathiascreutz
commited on
Commit
·
e5233d0
1
Parent(s):
b3319e6
Adding training sets
Browse files- opusparcus.py +1 -2
opusparcus.py
CHANGED
|
@@ -188,7 +188,6 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
|
|
| 188 |
self, lang, quality, filepath, split # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
| 189 |
):
|
| 190 |
|
| 191 |
-
print(lang, quality, filepath, split)
|
| 192 |
""" Yields examples as (key, example) tuples. """
|
| 193 |
# This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
| 194 |
# The `key` is here for legacy reason (tfds) and is not important in itself.
|
|
@@ -199,7 +198,7 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
|
|
| 199 |
# files, and only the desired language has been downloaded
|
| 200 |
for id_, row in enumerate(f):
|
| 201 |
data = json.loads(row)
|
| 202 |
-
if data["quality"] <
|
| 203 |
# The rest of this file contains too low quality data
|
| 204 |
break
|
| 205 |
yield id_, {
|
|
|
|
| 188 |
self, lang, quality, filepath, split # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
| 189 |
):
|
| 190 |
|
|
|
|
| 191 |
""" Yields examples as (key, example) tuples. """
|
| 192 |
# This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
| 193 |
# The `key` is here for legacy reason (tfds) and is not important in itself.
|
|
|
|
| 198 |
# files, and only the desired language has been downloaded
|
| 199 |
for id_, row in enumerate(f):
|
| 200 |
data = json.loads(row)
|
| 201 |
+
if data["quality"] < quality:
|
| 202 |
# The rest of this file contains too low quality data
|
| 203 |
break
|
| 204 |
yield id_, {
|