haps
Browse files- lb-data-test.py +35 -14
lb-data-test.py
CHANGED
|
@@ -34,6 +34,10 @@ class LaboASR(datasets.GeneratorBasedBuilder):
|
|
| 34 |
name="default",
|
| 35 |
description="Default config.",
|
| 36 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
]
|
| 38 |
|
| 39 |
def _info(self):
|
|
@@ -48,20 +52,37 @@ class LaboASR(datasets.GeneratorBasedBuilder):
|
|
| 48 |
)
|
| 49 |
|
| 50 |
def _split_generators(self, dl_manager):
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
|
| 66 |
def _generate_examples(
|
| 67 |
self,
|
|
|
|
| 34 |
name="default",
|
| 35 |
description="Default config.",
|
| 36 |
),
|
| 37 |
+
LaboASRConfig(
|
| 38 |
+
name="alternative",
|
| 39 |
+
description="Default config.",
|
| 40 |
+
),
|
| 41 |
]
|
| 42 |
|
| 43 |
def _info(self):
|
|
|
|
| 52 |
)
|
| 53 |
|
| 54 |
def _split_generators(self, dl_manager):
|
| 55 |
+
|
| 56 |
+
if self.config.name == "default":
|
| 57 |
+
return [
|
| 58 |
+
datasets.SplitGenerator(
|
| 59 |
+
name=datasets.Split.TRAIN,
|
| 60 |
+
gen_kwargs={
|
| 61 |
+
"paths": ["1", "2", "3"],
|
| 62 |
+
},
|
| 63 |
+
),
|
| 64 |
+
datasets.SplitGenerator(
|
| 65 |
+
name=datasets.Split.VALIDATION,
|
| 66 |
+
gen_kwargs={
|
| 67 |
+
"paths": ["4", "5", "6", "7"],
|
| 68 |
+
},
|
| 69 |
+
),
|
| 70 |
+
]
|
| 71 |
+
elif self.config.name == "alternative":
|
| 72 |
+
return [
|
| 73 |
+
datasets.SplitGenerator(
|
| 74 |
+
name=datasets.Split.TRAIN,
|
| 75 |
+
gen_kwargs={
|
| 76 |
+
"paths": ["1", "2", "3", "4"],
|
| 77 |
+
},
|
| 78 |
+
),
|
| 79 |
+
datasets.SplitGenerator(
|
| 80 |
+
name=datasets.Split.VALIDATION,
|
| 81 |
+
gen_kwargs={
|
| 82 |
+
"paths": ["5", "6", "7"],
|
| 83 |
+
},
|
| 84 |
+
),
|
| 85 |
+
]
|
| 86 |
|
| 87 |
def _generate_examples(
|
| 88 |
self,
|