mathiascreutz
commited on
Commit
·
2aa2147
1
Parent(s):
199b4e5
Testing configs
Browse files- opusparcus.py +4 -3
opusparcus.py
CHANGED
|
@@ -62,9 +62,12 @@ class OpusparcusConfig(datasets.BuilderConfig):
|
|
| 62 |
available dates can be found at https://dumps.wikimedia.org/enwiki/.
|
| 63 |
**kwargs: keyword arguments forwarded to super.
|
| 64 |
"""
|
|
|
|
|
|
|
| 65 |
super(OpusparcusConfig, self).__init__(
|
| 66 |
name="{0}".format(lang),
|
| 67 |
description="Opusparcus dataset for {0}".format(lang),
|
|
|
|
| 68 |
**kwargs,
|
| 69 |
)
|
| 70 |
self.lang = lang
|
|
@@ -73,8 +76,6 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
|
|
| 73 |
|
| 74 |
"""TODO: Short description of my dataset."""
|
| 75 |
|
| 76 |
-
VERSION = datasets.Version("1.1.0")
|
| 77 |
-
|
| 78 |
LANGS = [ "de", "en", "fi", "fr", "ru", "sv" ]
|
| 79 |
|
| 80 |
# This is an example of a dataset with multiple configurations.
|
|
@@ -87,7 +88,7 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
|
|
| 87 |
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
| 88 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
| 89 |
BUILDER_CONFIGS = [
|
| 90 |
-
OpusparcusConfig(lang=lang
|
| 91 |
]
|
| 92 |
|
| 93 |
#DEFAULT_CONFIG_NAME = "test" # It's not mandatory to have a default configuration. Just use one if it make sense.
|
|
|
|
| 62 |
available dates can be found at https://dumps.wikimedia.org/enwiki/.
|
| 63 |
**kwargs: keyword arguments forwarded to super.
|
| 64 |
"""
|
| 65 |
+
_VERSION = datasets.Version("1.0")
|
| 66 |
+
|
| 67 |
super(OpusparcusConfig, self).__init__(
|
| 68 |
name="{0}".format(lang),
|
| 69 |
description="Opusparcus dataset for {0}".format(lang),
|
| 70 |
+
version=_VERSION,
|
| 71 |
**kwargs,
|
| 72 |
)
|
| 73 |
self.lang = lang
|
|
|
|
| 76 |
|
| 77 |
"""TODO: Short description of my dataset."""
|
| 78 |
|
|
|
|
|
|
|
| 79 |
LANGS = [ "de", "en", "fi", "fr", "ru", "sv" ]
|
| 80 |
|
| 81 |
# This is an example of a dataset with multiple configurations.
|
|
|
|
| 88 |
# data = datasets.load_dataset('my_dataset', 'first_domain')
|
| 89 |
# data = datasets.load_dataset('my_dataset', 'second_domain')
|
| 90 |
BUILDER_CONFIGS = [
|
| 91 |
+
OpusparcusConfig(lang=lang) for lang in LANGS
|
| 92 |
]
|
| 93 |
|
| 94 |
#DEFAULT_CONFIG_NAME = "test" # It's not mandatory to have a default configuration. Just use one if it make sense.
|