Datasets:
Modalities:
Text
Size:
10K - 100K
Upload dataset_infos.yaml, Edit load_config.py
Browse files- dataset_infos.yaml +4 -0
- load_config.py +15 -3
dataset_infos.yaml
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
configs:
|
2 |
+
- name: SimCat-TASLP2018
|
3 |
+
description: "SimCat-TASLP2018"
|
4 |
+
version: 1.0.0
|
load_config.py
CHANGED
@@ -38,11 +38,23 @@ class MyDatasetConfig(datasets.BuilderConfig):
|
|
38 |
class MyDataset(datasets.GeneratorBasedBuilder):
|
39 |
"""Psycholinguistics word datasets"""
|
40 |
|
|
|
|
|
|
|
|
|
41 |
BUILDER_CONFIGS = [
|
42 |
-
datasets.BuilderConfig(
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
)
|
45 |
-
for
|
|
|
46 |
]
|
47 |
|
48 |
def _info(self):
|
|
|
38 |
class MyDataset(datasets.GeneratorBasedBuilder):
|
39 |
"""Psycholinguistics word datasets"""
|
40 |
|
41 |
+
# # 从 JSON 文件加载配置
|
42 |
+
# with open("dataset_infos.json", "r") as f:
|
43 |
+
# configs = json.load(f)["configs"]
|
44 |
+
|
45 |
BUILDER_CONFIGS = [
|
46 |
+
# datasets.BuilderConfig(
|
47 |
+
# name=sub, version=datasets.Version("1.0.0"), description=f"Psycholinguistics Volcabulary Datasets {sub}"
|
48 |
+
# )
|
49 |
+
# for sub in _SUBJECTS
|
50 |
+
|
51 |
+
MyDatasetConfig(
|
52 |
+
name=config["name"],
|
53 |
+
version=datasets.Version(config["version"]),
|
54 |
+
description=config["description"]
|
55 |
)
|
56 |
+
for config in datasets.utils.metadata.load_metadata_from_yaml("dataset_infos.yaml")["configs"]
|
57 |
+
|
58 |
]
|
59 |
|
60 |
def _info(self):
|