Update files from the datasets library (from 1.5.0)
Browse filesRelease notes: https://github.com/huggingface/datasets/releases/tag/1.5.0
- ted_talks_iwslt.py +3 -10
ted_talks_iwslt.py
CHANGED
@@ -217,7 +217,6 @@ class TedTalksIWSLTConfig(datasets.BuilderConfig):
|
|
217 |
super(TedTalksIWSLTConfig, self).__init__(
|
218 |
name=name,
|
219 |
description=description,
|
220 |
-
version=datasets.Version("1.1.0", ""),
|
221 |
**kwargs,
|
222 |
)
|
223 |
|
@@ -234,16 +233,12 @@ class TedTalksIWSLT(datasets.GeneratorBasedBuilder):
|
|
234 |
BUILDER_CONFIG_CLASS = TedTalksIWSLTConfig
|
235 |
|
236 |
BUILDER_CONFIGS = [
|
237 |
-
TedTalksIWSLTConfig(language_pair=language_pair, year=year)
|
238 |
for language_pair in _LANGUAGE_PAIRS
|
239 |
for year in _YEAR.keys()
|
240 |
]
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
def _info(self, language_pair=(None, None), year=None, **kwargs):
|
245 |
-
|
246 |
-
print(self.config.language_pair)
|
247 |
features = datasets.Features(
|
248 |
{
|
249 |
"translation": datasets.features.Translation(languages=self.config.language_pair),
|
@@ -303,7 +298,6 @@ class TedTalksIWSLT(datasets.GeneratorBasedBuilder):
|
|
303 |
source = filepath[0]
|
304 |
target = filepath[1]
|
305 |
|
306 |
-
# print(filepath)
|
307 |
language_pair = self.config.name.split("_")
|
308 |
|
309 |
def et_to_dict(tree):
|
@@ -351,7 +345,7 @@ class TedTalksIWSLT(datasets.GeneratorBasedBuilder):
|
|
351 |
source_ids = list()
|
352 |
target_ids = list()
|
353 |
else:
|
354 |
-
|
355 |
source_ids = list()
|
356 |
target_ids = list()
|
357 |
|
@@ -399,7 +393,6 @@ class TedTalksIWSLT(datasets.GeneratorBasedBuilder):
|
|
399 |
for s, t in transc
|
400 |
]
|
401 |
translation.extend(transcriptions)
|
402 |
-
# print(translation)
|
403 |
for talk_segment in translation:
|
404 |
result = {
|
405 |
"translation": {
|
|
|
217 |
super(TedTalksIWSLTConfig, self).__init__(
|
218 |
name=name,
|
219 |
description=description,
|
|
|
220 |
**kwargs,
|
221 |
)
|
222 |
|
|
|
233 |
BUILDER_CONFIG_CLASS = TedTalksIWSLTConfig
|
234 |
|
235 |
BUILDER_CONFIGS = [
|
236 |
+
TedTalksIWSLTConfig(language_pair=language_pair, year=year, version=datasets.Version("1.1.0"))
|
237 |
for language_pair in _LANGUAGE_PAIRS
|
238 |
for year in _YEAR.keys()
|
239 |
]
|
240 |
|
241 |
+
def _info(self):
|
|
|
|
|
|
|
|
|
242 |
features = datasets.Features(
|
243 |
{
|
244 |
"translation": datasets.features.Translation(languages=self.config.language_pair),
|
|
|
298 |
source = filepath[0]
|
299 |
target = filepath[1]
|
300 |
|
|
|
301 |
language_pair = self.config.name.split("_")
|
302 |
|
303 |
def et_to_dict(tree):
|
|
|
345 |
source_ids = list()
|
346 |
target_ids = list()
|
347 |
else:
|
348 |
+
logger.warning(f"File doesn't exist {source} or {target}")
|
349 |
source_ids = list()
|
350 |
target_ids = list()
|
351 |
|
|
|
393 |
for s, t in transc
|
394 |
]
|
395 |
translation.extend(transcriptions)
|
|
|
396 |
for talk_segment in translation:
|
397 |
result = {
|
398 |
"translation": {
|