Datasets:

Modalities:
Audio
Text
Formats:
parquet
Libraries:
Datasets
Dask
License:
BenjaminGalliot commited on
Commit
8df3d35
1 Parent(s): 2451bdd

Mise à jour partielle (suite, fichier de création)

Browse files
Files changed (1) hide show
  1. pangloss.py +3 -8
pangloss.py CHANGED
@@ -93,11 +93,6 @@ class PanglossDataset(datasets.GeneratorBasedBuilder):
93
  "traduction:zh": "translation:zh"
94
  }
95
 
96
- language_codes = {
97
- "yong1288": "na",
98
- "japh1234": "japhug"
99
- }
100
-
101
  # This is an example of a dataset with multiple configurations.
102
  # If you don't want/need to define several sub-sets in your dataset,
103
  # just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
@@ -160,7 +155,7 @@ class PanglossDataset(datasets.GeneratorBasedBuilder):
160
  name=datasets.Split.TRAIN,
161
  # These kwargs will be passed to _generate_examples
162
  gen_kwargs={
163
- "filepath": os.path.join(data_dir, self.language_codes[self.config.name], "train.csv"),
164
  "split": "train"
165
  },
166
  ),
@@ -168,7 +163,7 @@ class PanglossDataset(datasets.GeneratorBasedBuilder):
168
  name=datasets.Split.TEST,
169
  # These kwargs will be passed to _generate_examples
170
  gen_kwargs={
171
- "filepath": os.path.join(data_dir, self.language_codes[self.config.name], "test.csv"),
172
  "split": "test"
173
  },
174
  ),
@@ -176,7 +171,7 @@ class PanglossDataset(datasets.GeneratorBasedBuilder):
176
  name=datasets.Split.VALIDATION,
177
  # These kwargs will be passed to _generate_examples
178
  gen_kwargs={
179
- "filepath": os.path.join(data_dir, self.language_codes[self.config.name], "validation.csv"),
180
  "split": "validation"
181
  },
182
  ),
 
93
  "traduction:zh": "translation:zh"
94
  }
95
 
 
 
 
 
 
96
  # This is an example of a dataset with multiple configurations.
97
  # If you don't want/need to define several sub-sets in your dataset,
98
  # just remove the BUILDER_CONFIG_CLASS and the BUILDER_CONFIGS attributes.
 
155
  name=datasets.Split.TRAIN,
156
  # These kwargs will be passed to _generate_examples
157
  gen_kwargs={
158
+ "filepath": os.path.join(data_dir, self.config.name, "train.csv"),
159
  "split": "train"
160
  },
161
  ),
 
163
  name=datasets.Split.TEST,
164
  # These kwargs will be passed to _generate_examples
165
  gen_kwargs={
166
+ "filepath": os.path.join(data_dir, self.config.name, "test.csv"),
167
  "split": "test"
168
  },
169
  ),
 
171
  name=datasets.Split.VALIDATION,
172
  # These kwargs will be passed to _generate_examples
173
  gen_kwargs={
174
+ "filepath": os.path.join(data_dir, self.config.name, "validation.csv"),
175
  "split": "validation"
176
  },
177
  ),