cheulyop commited on
Commit
8e2083e
1 Parent(s): 6ec1b74

Fix 'path' -> 'filepath'

Browse files
Files changed (1) hide show
  1. ksponspeech.py +4 -4
ksponspeech.py CHANGED
@@ -100,17 +100,17 @@ class KsponSpeech(datasets.GeneratorBasedBuilder):
100
  ) as f2:
101
  data = "\n".join([f1.read().strip(), f2.read().strip()])
102
  for id_, row in enumerate(data.split("\n")):
103
- path, sentence = tuple(row.split(" :: "))
104
  yield id_, {
105
- "file": path.join(self.data_dir, path),
106
  "sentence": sentence,
107
  }
108
  else:
109
  with open(filepath, encoding="utf-8") as f:
110
  data = f.read().strip()
111
  for id_, row in enumerate(data.split("\n")):
112
- path, sentence = tuple(row.split(" :: "))
113
  yield id_, {
114
- "file": path.join(self.data_dir, path),
115
  "sentence": sentence,
116
  }
 
100
  ) as f2:
101
  data = "\n".join([f1.read().strip(), f2.read().strip()])
102
  for id_, row in enumerate(data.split("\n")):
103
+ filepath, sentence = tuple(row.split(" :: "))
104
  yield id_, {
105
+ "file": path.join(self.data_dir, filepath),
106
  "sentence": sentence,
107
  }
108
  else:
109
  with open(filepath, encoding="utf-8") as f:
110
  data = f.read().strip()
111
  for id_, row in enumerate(data.split("\n")):
112
+ filepath, sentence = tuple(row.split(" :: "))
113
  yield id_, {
114
+ "file": path.join(self.data_dir, filepath),
115
  "sentence": sentence,
116
  }