Upload basic_sentence_transforms.py
Browse files
basic_sentence_transforms.py
CHANGED
|
@@ -134,7 +134,7 @@ configs = [
|
|
| 134 |
"features": dir_only},
|
| 135 |
]
|
| 136 |
|
| 137 |
-
class
|
| 138 |
"""BuilderConfig for basic_sentence_transforms dataset."""
|
| 139 |
|
| 140 |
def __init__(self, features=None, **kwargs):
|
|
@@ -159,8 +159,8 @@ class NcPatConfig(datasets.BuilderConfig):
|
|
| 159 |
citation=self.citation,
|
| 160 |
)
|
| 161 |
|
| 162 |
-
class
|
| 163 |
-
BUILDER_CONFIGS = [
|
| 164 |
VERSION = datasets.Version("0.0.18")
|
| 165 |
|
| 166 |
def _info(self):
|
|
@@ -200,6 +200,6 @@ class NcPat(datasets.GeneratorBasedBuilder):
|
|
| 200 |
|
| 201 |
if __name__ == "__main__":
|
| 202 |
# short test
|
| 203 |
-
builder =
|
| 204 |
print("name: {}, desc: {}".format(builder.name, builder.description))
|
| 205 |
|
|
|
|
| 134 |
"features": dir_only},
|
| 135 |
]
|
| 136 |
|
| 137 |
+
class BasicSentenceTransformsConfig(datasets.BuilderConfig):
|
| 138 |
"""BuilderConfig for basic_sentence_transforms dataset."""
|
| 139 |
|
| 140 |
def __init__(self, features=None, **kwargs):
|
|
|
|
| 159 |
citation=self.citation,
|
| 160 |
)
|
| 161 |
|
| 162 |
+
class BasicSentenceTransforms(datasets.GeneratorBasedBuilder):
|
| 163 |
+
BUILDER_CONFIGS = [BasicSentenceTransformsConfig(name=c["name"], description=c["desc"], features=c["features"]) for c in configs]
|
| 164 |
VERSION = datasets.Version("0.0.18")
|
| 165 |
|
| 166 |
def _info(self):
|
|
|
|
| 200 |
|
| 201 |
if __name__ == "__main__":
|
| 202 |
# short test
|
| 203 |
+
builder = BasicSentenceTransforms.BUILDER_CONFIGS[0]
|
| 204 |
print("name: {}, desc: {}".format(builder.name, builder.description))
|
| 205 |
|