Files changed (1) hide show
  1. MOCKS-test.py +17 -20
MOCKS-test.py CHANGED
@@ -54,8 +54,7 @@ _DL_URLS_TEMPLATE = {
54
  }
55
 
56
  _MOCKS_SETS = [
57
- "en.LS-clean",
58
- ]
59
  # "en.LS-other",
60
  # "en.MCV",
61
  # "de.MCV",
@@ -82,7 +81,6 @@ class Mocks(datasets.GeneratorBasedBuilder):
82
  for subset in _MOCKS_SETS for suffix in _MOCKS_SUFFIXES]
83
 
84
  def _info(self):
85
- logger.info("info")
86
  return datasets.DatasetInfo(
87
  description=_DESCRIPTION,
88
  features=datasets.Features({
@@ -116,10 +114,10 @@ class Mocks(datasets.GeneratorBasedBuilder):
116
  k: v%(subset_lang, subset_name, "offline")
117
  for k, v in _DL_URLS_TEMPLATE.items()
118
  })
119
- # online_archive_path = dl_manager.download({
120
- # k: v%(subset_lang, subset_name, "online")
121
- # for k, v in _DL_URLS_TEMPLATE.items()
122
- # })
123
 
124
  split_offline = [datasets.SplitGenerator(
125
  name="offline",
@@ -132,19 +130,18 @@ class Mocks(datasets.GeneratorBasedBuilder):
132
  )
133
  ]
134
 
135
- # split_online = [datasets.SplitGenerator(
136
- # name="online",
137
- # gen_kwargs={
138
- # "audio_files": dl_manager.iter_archive(online_archive_path["data"]),
139
- # "transcription_keyword": offline_archive_path["transcription"],
140
- # "transcription_test": online_archive_path["transcription"],
141
- # "pairs": [online_archive_path[pair_type] for pair_type in pairs_types],
142
- # }
143
- # )
144
- # ]
145
-
146
- # return split_offline + split_online
147
- return split_offline
148
 
149
 
150
  def _read_transcription(self, transcription_path):
 
54
  }
55
 
56
  _MOCKS_SETS = [
57
+ "en.LS-clean"]
 
58
  # "en.LS-other",
59
  # "en.MCV",
60
  # "de.MCV",
 
81
  for subset in _MOCKS_SETS for suffix in _MOCKS_SUFFIXES]
82
 
83
  def _info(self):
 
84
  return datasets.DatasetInfo(
85
  description=_DESCRIPTION,
86
  features=datasets.Features({
 
114
  k: v%(subset_lang, subset_name, "offline")
115
  for k, v in _DL_URLS_TEMPLATE.items()
116
  })
117
+ online_archive_path = dl_manager.download({
118
+ k: v%(subset_lang, subset_name, "online")
119
+ for k, v in _DL_URLS_TEMPLATE.items()
120
+ })
121
 
122
  split_offline = [datasets.SplitGenerator(
123
  name="offline",
 
130
  )
131
  ]
132
 
133
+ split_online = [datasets.SplitGenerator(
134
+ name="online",
135
+ gen_kwargs={
136
+ "audio_files": dl_manager.iter_archive(online_archive_path["data"]),
137
+ "transcription_keyword": offline_archive_path["transcription"],
138
+ "transcription_test": online_archive_path["transcription"],
139
+ "pairs": [online_archive_path[pair_type] for pair_type in pairs_types],
140
+ }
141
+ )
142
+ ]
143
+
144
+ return split_offline + split_online
 
145
 
146
 
147
  def _read_transcription(self, transcription_path):