Datasets:
Add language subsets, default to with_audio=True
Browse files- jam-alt.py +6 -3
jam-alt.py
CHANGED
@@ -39,7 +39,7 @@ _LANGUAGE_NAME_TO_CODE = {
|
|
39 |
@dataclass
|
40 |
class JamAltBuilderConfig(datasets.BuilderConfig):
|
41 |
language: Optional[str] = None
|
42 |
-
with_audio: bool =
|
43 |
decode_audio: bool = True
|
44 |
sampling_rate: Optional[int] = None
|
45 |
mono: bool = True
|
@@ -51,8 +51,11 @@ class JamAltDataset(datasets.GeneratorBasedBuilder):
|
|
51 |
|
52 |
VERSION = datasets.Version("0.0.0")
|
53 |
BUILDER_CONFIG_CLASS = JamAltBuilderConfig
|
54 |
-
BUILDER_CONFIGS = [JamAltBuilderConfig("
|
55 |
-
|
|
|
|
|
|
|
56 |
|
57 |
def _info(self):
|
58 |
feat_dict = {
|
|
|
39 |
@dataclass
|
40 |
class JamAltBuilderConfig(datasets.BuilderConfig):
|
41 |
language: Optional[str] = None
|
42 |
+
with_audio: bool = True
|
43 |
decode_audio: bool = True
|
44 |
sampling_rate: Optional[int] = None
|
45 |
mono: bool = True
|
|
|
51 |
|
52 |
VERSION = datasets.Version("0.0.0")
|
53 |
BUILDER_CONFIG_CLASS = JamAltBuilderConfig
|
54 |
+
BUILDER_CONFIGS = [JamAltBuilderConfig("all")] + [
|
55 |
+
JamAltBuilderConfig(lang, language=lang)
|
56 |
+
for lang in _LANGUAGE_NAME_TO_CODE.values()
|
57 |
+
]
|
58 |
+
DEFAULT_CONFIG_NAME = "all"
|
59 |
|
60 |
def _info(self):
|
61 |
feat_dict = {
|