Update xsum-kk3.py
Browse files- xsum-kk3.py +35 -1
xsum-kk3.py
CHANGED
@@ -89,7 +89,41 @@ class Xsum(datasets.GeneratorBasedBuilder):
|
|
89 |
citation=_CITATION,
|
90 |
)
|
91 |
|
92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
def _generate_examples(self, split_path, split_name, data_dir, files):
|
95 |
"""Yields examples."""
|
|
|
89 |
citation=_CITATION,
|
90 |
)
|
91 |
|
92 |
+
def _split_generators(self, dl_manager):
|
93 |
+
"""Returns SplitGenerators."""
|
94 |
+
|
95 |
+
files_to_download = {"data": _URL_DATA, "splits": _URL_SPLITS}
|
96 |
+
downloaded_files = dl_manager.download(files_to_download)
|
97 |
+
|
98 |
+
return [
|
99 |
+
datasets.SplitGenerator(
|
100 |
+
name=datasets.Split.TRAIN,
|
101 |
+
gen_kwargs={
|
102 |
+
"split_path": downloaded_files["splits"],
|
103 |
+
"split_name": "train",
|
104 |
+
"data_dir": "data",
|
105 |
+
"files": dl_manager.iter_archive(downloaded_files["data"]),
|
106 |
+
},
|
107 |
+
),
|
108 |
+
datasets.SplitGenerator(
|
109 |
+
name=datasets.Split.VALIDATION,
|
110 |
+
gen_kwargs={
|
111 |
+
"split_path": downloaded_files["splits"],
|
112 |
+
"split_name": "validation",
|
113 |
+
"data_dir": "data",
|
114 |
+
"files": dl_manager.iter_archive(downloaded_files["data"]),
|
115 |
+
},
|
116 |
+
),
|
117 |
+
datasets.SplitGenerator(
|
118 |
+
name=datasets.Split.TEST,
|
119 |
+
gen_kwargs={
|
120 |
+
"split_path": downloaded_files["splits"],
|
121 |
+
"split_name": "test",
|
122 |
+
"data_dir": "data",
|
123 |
+
"files": dl_manager.iter_archive(downloaded_files["data"]),
|
124 |
+
},
|
125 |
+
),
|
126 |
+
]
|
127 |
|
128 |
def _generate_examples(self, split_path, split_name, data_dir, files):
|
129 |
"""Yields examples."""
|