Datasets:
GEM
/

Tasks:
Other
Multilinguality:
unknown
Size Categories:
unknown
Language Creators:
unknown
Annotations Creators:
expert-created
Source Datasets:
original
License:
mathiascreutz commited on
Commit
fe67c05
1 Parent(s): aa5615d

Testing configs

Browse files
Files changed (1) hide show
  1. opusparcus.py +5 -5
opusparcus.py CHANGED
@@ -63,7 +63,7 @@ class OpusparcusConfig(datasets.BuilderConfig):
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
  )
@@ -85,7 +85,7 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
85
  # data = datasets.load_dataset('my_dataset', 'first_domain')
86
  # data = datasets.load_dataset('my_dataset', 'second_domain')
87
  BUILDER_CONFIGS = [
88
- OpusparcusConfig(name="de", version=VERSION, description="This part of my dataset covers a first domain"),
89
  ]
90
 
91
  #DEFAULT_CONFIG_NAME = "test" # It's not mandatory to have a default configuration. Just use one if it make sense.
@@ -142,7 +142,7 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
142
  name=datasets.Split.TEST,
143
  # These kwargs will be passed to _generate_examples
144
  gen_kwargs={
145
- "name": self.config.name,
146
  "filepath": data_dir["test"],
147
  "split": "test"
148
  },
@@ -151,7 +151,7 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
151
  name=datasets.Split.VALIDATION,
152
  # These kwargs will be passed to _generate_examples
153
  gen_kwargs={
154
- "name": self.config.name,
155
  "filepath": data_dir["validation"],
156
  "split": "validation",
157
  },
@@ -159,7 +159,7 @@ class Opusparcus(datasets.GeneratorBasedBuilder):
159
  ]
160
 
161
  def _generate_examples(
162
- self, name, filepath, split # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
163
  ):
164
 
165
  """ Yields examples as (key, example) tuples. """
 
63
  **kwargs: keyword arguments forwarded to super.
64
  """
65
  super(OpusparcusConfig, self).__init__(
66
+ lang="{0}".format(lang),
67
  description="Opusparcus dataset for {0}".format(lang),
68
  **kwargs,
69
  )
 
85
  # data = datasets.load_dataset('my_dataset', 'first_domain')
86
  # data = datasets.load_dataset('my_dataset', 'second_domain')
87
  BUILDER_CONFIGS = [
88
+ OpusparcusConfig(lang="de", version=VERSION, description="This part of my dataset covers a first domain"),
89
  ]
90
 
91
  #DEFAULT_CONFIG_NAME = "test" # It's not mandatory to have a default configuration. Just use one if it make sense.
 
142
  name=datasets.Split.TEST,
143
  # These kwargs will be passed to _generate_examples
144
  gen_kwargs={
145
+ "lang": self.config.lang,
146
  "filepath": data_dir["test"],
147
  "split": "test"
148
  },
 
151
  name=datasets.Split.VALIDATION,
152
  # These kwargs will be passed to _generate_examples
153
  gen_kwargs={
154
+ "lang": self.config.lang,
155
  "filepath": data_dir["validation"],
156
  "split": "validation",
157
  },
 
159
  ]
160
 
161
  def _generate_examples(
162
+ self, lang, filepath, split # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
163
  ):
164
 
165
  """ Yields examples as (key, example) tuples. """