Datasets:
test 2
Browse files
fleurs.py
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
|
16 |
import os
|
17 |
from collections import OrderedDict
|
18 |
-
from text_processor.text_processor import TextProcessor
|
19 |
import datasets
|
20 |
|
21 |
logger = datasets.logging.get_logger(__name__)
|
@@ -52,7 +52,7 @@ for langs in _FLEURS_LANG:
|
|
52 |
_ALL_CONFIGS.append("all")
|
53 |
|
54 |
# TODO(FLEURS)
|
55 |
-
_DESCRIPTION = "
|
56 |
_CITATION = ""
|
57 |
_HOMEPAGE_URL = ""
|
58 |
|
@@ -104,7 +104,7 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
104 |
# "audio": datasets.Audio(sampling_rate=48_000),
|
105 |
"audio": datasets.features.Audio(sampling_rate=48_000),
|
106 |
"transcription": datasets.Value("string"),
|
107 |
-
"
|
108 |
"lang_id": datasets.ClassLabel(names=langs),
|
109 |
"language": datasets.Value("string"),
|
110 |
"lang_group_id": datasets.ClassLabel(
|
@@ -185,7 +185,7 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
185 |
]
|
186 |
|
187 |
def _get_data(self, lines, lang_id):
|
188 |
-
tp = TextProcessor()
|
189 |
data = {}
|
190 |
for line in lines:
|
191 |
if isinstance(line, bytes):
|
@@ -204,7 +204,7 @@ class Fleurs(datasets.GeneratorBasedBuilder):
|
|
204 |
|
205 |
data[file_name] = {
|
206 |
"id": int(_id),
|
207 |
-
"
|
208 |
"transcription": transcription,
|
209 |
"num_samples": int(num_samples),
|
210 |
"lang_id": _FLEURS_LANG.index(lang_id),
|
|
|
15 |
|
16 |
import os
|
17 |
from collections import OrderedDict
|
18 |
+
# from text_processor.text_processor import TextProcessor
|
19 |
import datasets
|
20 |
|
21 |
logger = datasets.logging.get_logger(__name__)
|
|
|
52 |
_ALL_CONFIGS.append("all")
|
53 |
|
54 |
# TODO(FLEURS)
|
55 |
+
_DESCRIPTION = "2.FLEURS is the speech version of the FLORES machine translation benchmark, covering 2000 n-way parallel sentences in n=102 languages."
|
56 |
_CITATION = ""
|
57 |
_HOMEPAGE_URL = ""
|
58 |
|
|
|
104 |
# "audio": datasets.Audio(sampling_rate=48_000),
|
105 |
"audio": datasets.features.Audio(sampling_rate=48_000),
|
106 |
"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(
|
|
|
185 |
]
|
186 |
|
187 |
def _get_data(self, lines, lang_id):
|
188 |
+
# tp = TextProcessor()
|
189 |
data = {}
|
190 |
for line in lines:
|
191 |
if isinstance(line, bytes):
|
|
|
204 |
|
205 |
data[file_name] = {
|
206 |
"id": int(_id),
|
207 |
+
"sentence": raw_transcription,
|
208 |
"transcription": transcription,
|
209 |
"num_samples": int(num_samples),
|
210 |
"lang_id": _FLEURS_LANG.index(lang_id),
|