Datasets:
rm gender
Browse files
fleurs.py
CHANGED
@@ -105,7 +105,6 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
105 |
"transcription": datasets.Value("string"),
|
106 |
"raw_transcription": datasets.Value("string"),
|
107 |
"sentence": datasets.Value("string"),
|
108 |
-
"gender": datasets.ClassLabel(names=["male", "female", "other"]),
|
109 |
"lang_id": datasets.ClassLabel(names=langs),
|
110 |
"language": datasets.Value("string"),
|
111 |
"lang_group_id": datasets.ClassLabel(
|
@@ -188,7 +187,6 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
188 |
def _get_data(self, lines, lang_id):
|
189 |
tp = TextProcessor()
|
190 |
data = {}
|
191 |
-
gender_to_id = {"MALE": 0, "FEMALE": 1, "OTHER": 2}
|
192 |
for line in lines:
|
193 |
if isinstance(line, bytes):
|
194 |
line = line.decode("utf-8")
|
@@ -211,7 +209,6 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
211 |
"transcription": transcription,
|
212 |
"sentence": sentence,
|
213 |
"num_samples": int(num_samples),
|
214 |
-
"gender": gender_to_id[gender],
|
215 |
"lang_id": _FLEURS_LANG.index(lang_id),
|
216 |
"language": _FLEURS_LANG_TO_LONG[lang_id],
|
217 |
"lang_group_id": list(_FLEURS_GROUP_TO_LONG.keys()).index(
|
|
|
105 |
"transcription": datasets.Value("string"),
|
106 |
"raw_transcription": datasets.Value("string"),
|
107 |
"sentence": datasets.Value("string"),
|
|
|
108 |
"lang_id": datasets.ClassLabel(names=langs),
|
109 |
"language": datasets.Value("string"),
|
110 |
"lang_group_id": datasets.ClassLabel(
|
|
|
187 |
def _get_data(self, lines, lang_id):
|
188 |
tp = TextProcessor()
|
189 |
data = {}
|
|
|
190 |
for line in lines:
|
191 |
if isinstance(line, bytes):
|
192 |
line = line.decode("utf-8")
|
|
|
209 |
"transcription": transcription,
|
210 |
"sentence": sentence,
|
211 |
"num_samples": int(num_samples),
|
|
|
212 |
"lang_id": _FLEURS_LANG.index(lang_id),
|
213 |
"language": _FLEURS_LANG_TO_LONG[lang_id],
|
214 |
"lang_group_id": list(_FLEURS_GROUP_TO_LONG.keys()).index(
|