Datasets:

ArXiv:
License:
Georgios Spithourakis commited on
Commit
2ed7507
·
1 Parent(s): be1a510

Update evi.py

Browse files
Files changed (1) hide show
  1. evi.py +8 -8
evi.py CHANGED
@@ -45,7 +45,7 @@ _HOMEPAGE_URL = "https://arxiv.org/abs/2204.13496"
45
 
46
  _AUDIO_DATA_URL = "https://poly-public-data.s3.eu-west-2.amazonaws.com/evi-paper/audios.zip" # noqa
47
 
48
- _VERSION = datasets.Version("0.0.5", "")
49
 
50
 
51
  class EviConfig(datasets.BuilderConfig):
@@ -116,15 +116,15 @@ class Evi(datasets.GeneratorBasedBuilder):
116
  def _split_generators(self, dl_manager):
117
  langs = ([self.config.name])
118
 
119
- #audio_path = dl_manager.download_and_extract(
120
- # self.config.audio_data_url
121
- #)
122
  audio_path = ""
123
- text_path = ""
124
  lang2text_path = {
125
  _lang: os.path.join(
126
  text_path,
127
- f"dialogues.{_lang.split('-')[0]}.csv"
128
  )
129
  for _lang in langs
130
  }
@@ -152,7 +152,7 @@ class Evi(datasets.GeneratorBasedBuilder):
152
  audio_path = audio_paths[lang]
153
  with open(text_path, encoding="utf-8") as fin:
154
  reader = csv.DictReader(
155
- fin, delimiter=",", skipinitialspace=True
156
  )
157
  for dictrow in reader:
158
  dialogue_id = dictrow["dialogue_id"]
@@ -177,4 +177,4 @@ class Evi(datasets.GeneratorBasedBuilder):
177
  }
178
  print(example)
179
  yield key, example
180
- key += 1
 
45
 
46
  _AUDIO_DATA_URL = "https://poly-public-data.s3.eu-west-2.amazonaws.com/evi-paper/audios.zip" # noqa
47
 
48
+ _VERSION = datasets.Version("0.0.6", "")
49
 
50
 
51
  class EviConfig(datasets.BuilderConfig):
 
116
  def _split_generators(self, dl_manager):
117
  langs = ([self.config.name])
118
 
119
+ # audio_path = dl_manager.download_and_extract(
120
+ # self.config.audio_data_url
121
+ # )
122
  audio_path = ""
123
+ text_path = "data"
124
  lang2text_path = {
125
  _lang: os.path.join(
126
  text_path,
127
+ f"dialogues.{_lang.split('-')[0]}.tsv"
128
  )
129
  for _lang in langs
130
  }
 
152
  audio_path = audio_paths[lang]
153
  with open(text_path, encoding="utf-8") as fin:
154
  reader = csv.DictReader(
155
+ fin, delimiter="\t", skipinitialspace=True
156
  )
157
  for dictrow in reader:
158
  dialogue_id = dictrow["dialogue_id"]
 
177
  }
178
  print(example)
179
  yield key, example
180
+ key += 1