adding dataset loading script
Browse files- SciDuet.py +16 -17
SciDuet.py
CHANGED
@@ -35,13 +35,7 @@ In the released dataset, the original papers and slides (both are in PDF format)
|
|
35 |
The text contents from multiple slides that correspond to the same slide title are mreged.
|
36 |
"""
|
37 |
|
38 |
-
|
39 |
-
_URLs = {
|
40 |
-
"train": "train.json",
|
41 |
-
"validation": "validation.json",
|
42 |
-
"test": "test.json",
|
43 |
-
"challenge_set": "challenge_woSectionHeader.json",
|
44 |
-
}
|
45 |
|
46 |
|
47 |
class SciDuetConfig(datasets.BuilderConfig):
|
@@ -56,13 +50,14 @@ class SciDuetConfig(datasets.BuilderConfig):
|
|
56 |
|
57 |
|
58 |
class SciDuet(datasets.GeneratorBasedBuilder):
|
59 |
-
VERSION_1 = datasets.Version("1.0.0")
|
60 |
|
61 |
-
|
62 |
-
SciDuetConfig(name="gem_data_split", version=VERSION_1, description="SciDuet - GEM version 1"),
|
63 |
-
]
|
64 |
|
65 |
-
|
|
|
|
|
|
|
|
|
66 |
|
67 |
def _info(self):
|
68 |
|
@@ -89,17 +84,21 @@ class SciDuet(datasets.GeneratorBasedBuilder):
|
|
89 |
|
90 |
}
|
91 |
),
|
92 |
-
# If there's a common (input, target) tuple from the features,
|
93 |
-
# specify them here. They'll be used if as_supervised=True in
|
94 |
-
# builder.as_dataset.
|
95 |
supervised_keys=None,
|
96 |
license="Apache License 2.0",
|
97 |
citation=_CITATION,
|
98 |
)
|
99 |
|
|
|
100 |
def _split_generators(self, dl_manager):
|
101 |
-
|
102 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
103 |
|
104 |
return [
|
105 |
datasets.SplitGenerator(
|
|
|
35 |
The text contents from multiple slides that correspond to the same slide title are mreged.
|
36 |
"""
|
37 |
|
38 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
40 |
|
41 |
class SciDuetConfig(datasets.BuilderConfig):
|
|
|
50 |
|
51 |
|
52 |
class SciDuet(datasets.GeneratorBasedBuilder):
|
|
|
53 |
|
54 |
+
VERSION = datasets.Version("1.0.0")
|
|
|
|
|
55 |
|
56 |
+
# BUILDER_CONFIGS = [
|
57 |
+
# SciDuetConfig(name="gem_data_split", version=VERSION_1, description="SciDuet - GEM version 1"),
|
58 |
+
# ]
|
59 |
+
#
|
60 |
+
# DEFAULT_CONFIG_NAME = "gem_data_split"
|
61 |
|
62 |
def _info(self):
|
63 |
|
|
|
84 |
|
85 |
}
|
86 |
),
|
|
|
|
|
|
|
87 |
supervised_keys=None,
|
88 |
license="Apache License 2.0",
|
89 |
citation=_CITATION,
|
90 |
)
|
91 |
|
92 |
+
|
93 |
def _split_generators(self, dl_manager):
|
94 |
+
_URL = "https://huggingface.co/datasets/GEM/SciDuet/"
|
95 |
+
_URLs = {
|
96 |
+
"train": "train.json",
|
97 |
+
"validation": "validation.json",
|
98 |
+
"test": "test.json",
|
99 |
+
"challenge_set": "challenge_woSectionHeader.json",
|
100 |
+
}
|
101 |
+
downloaded_files = dl_manager.download_and_extract(_URLs)
|
102 |
|
103 |
return [
|
104 |
datasets.SplitGenerator(
|