Delete loading script
Browse files- DyckLanguage.py +0 -56
DyckLanguage.py
DELETED
@@ -1,56 +0,0 @@
|
|
1 |
-
import datasets
|
2 |
-
import os
|
3 |
-
import json
|
4 |
-
|
5 |
-
|
6 |
-
_CITATION = """
|
7 |
-
|
8 |
-
"""
|
9 |
-
|
10 |
-
_DESCRIPTION = """
|
11 |
-
|
12 |
-
"""
|
13 |
-
|
14 |
-
class Builder(datasets.GeneratorBasedBuilder):
|
15 |
-
VERSION = datasets.Version("1.0.0")
|
16 |
-
|
17 |
-
BUILDER_CONFIGS = [
|
18 |
-
datasets.BuilderConfig(name=name, version=datasets.Version("1.0.0"), description=_DESCRIPTION)
|
19 |
-
for name in ["2", "3", "4"]
|
20 |
-
]
|
21 |
-
|
22 |
-
def _info(self):
|
23 |
-
features = datasets.Features(
|
24 |
-
{
|
25 |
-
"input": datasets.Value("string"),
|
26 |
-
"output": datasets.Value("string"),
|
27 |
-
}
|
28 |
-
)
|
29 |
-
return datasets.DatasetInfo(
|
30 |
-
description=_DESCRIPTION,
|
31 |
-
features=features,
|
32 |
-
homepage="",
|
33 |
-
license="",
|
34 |
-
citation=_CITATION,
|
35 |
-
)
|
36 |
-
|
37 |
-
def _split_generators(self, dl_manager):
|
38 |
-
train_json = dl_manager.download(os.path.join(self.config.name, "train.jsonl"))
|
39 |
-
test_json = dl_manager.download(os.path.join(self.config.name, "test.jsonl"))
|
40 |
-
|
41 |
-
return [
|
42 |
-
datasets.SplitGenerator(
|
43 |
-
name=datasets.Split.TRAIN,
|
44 |
-
gen_kwargs={"path": train_json},
|
45 |
-
),
|
46 |
-
datasets.SplitGenerator(
|
47 |
-
name=datasets.Split.TEST,
|
48 |
-
gen_kwargs={"path": test_json},
|
49 |
-
),
|
50 |
-
]
|
51 |
-
|
52 |
-
# method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
|
53 |
-
def _generate_examples(self, path):
|
54 |
-
with open(path, encoding="utf-8") as f:
|
55 |
-
for key, row in enumerate(f):
|
56 |
-
yield key, json.loads(row)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|