Datasets:
ronaldahmed
commited on
Commit
•
d648ad0
1
Parent(s):
49ac8b1
challenge sets: abstractivity and topic diversity
Browse files- animal.zip +2 -2
- company.zip +2 -2
- film.zip +2 -2
- wiki_cat_sum.py +13 -5
animal.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:47869bcb495437c21bb9a3a59da5615d92224761a80147d94b68093c920f6f86
|
3 |
+
size 48552492
|
company.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:8ee5627ba95e05e7a87d759b226f3e0cc0f94d731b7c5dc99a99aa99cad106db
|
3 |
+
size 86035755
|
film.zip
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f67fa8665b365a9f111da965a839351a6b396eaf88194716f237168c64e778f0
|
3 |
+
size 84121809
|
wiki_cat_sum.py
CHANGED
@@ -83,6 +83,8 @@ class WikiCatSum(datasets.GeneratorBasedBuilder):
|
|
83 |
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|
84 |
features = datasets.Features(
|
85 |
{
|
|
|
|
|
86 |
"id": datasets.Value("string"),
|
87 |
"title": datasets.Value("string"),
|
88 |
"paragraphs": datasets.features.Sequence(
|
@@ -123,10 +125,13 @@ class WikiCatSum(datasets.GeneratorBasedBuilder):
|
|
123 |
my_urls = _URLs[self.config.name]
|
124 |
data_dir = dl_manager.download_and_extract(my_urls)
|
125 |
challenge_sets = [
|
126 |
-
("
|
127 |
-
for
|
|
|
|
|
|
|
128 |
]
|
129 |
-
|
130 |
|
131 |
return [
|
132 |
datasets.SplitGenerator(
|
@@ -171,8 +176,11 @@ class WikiCatSum(datasets.GeneratorBasedBuilder):
|
|
171 |
# This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
172 |
# The `key` is here for legacy reason (tfds) and is not important in itself.
|
173 |
|
|
|
|
|
174 |
with open(filepath, encoding="utf-8") as f:
|
175 |
-
for row in f:
|
176 |
data = json.loads(row)
|
|
|
177 |
data["gem_id"] = "GEM-wiki_cat_sum-%s-%d" % (split,data["id"]+1)
|
178 |
-
yield
|
|
|
83 |
# TODO: This method specifies the datasets.DatasetInfo object which contains informations and typings for the dataset
|
84 |
features = datasets.Features(
|
85 |
{
|
86 |
+
"gem_id": datasets.Value("string"),
|
87 |
+
"gem_parent_id": datasets.Value("string"),
|
88 |
"id": datasets.Value("string"),
|
89 |
"title": datasets.Value("string"),
|
90 |
"paragraphs": datasets.features.Sequence(
|
|
|
125 |
my_urls = _URLs[self.config.name]
|
126 |
data_dir = dl_manager.download_and_extract(my_urls)
|
127 |
challenge_sets = [
|
128 |
+
("challenge_nov_%d" % lvl,"test-%s_nv_%d.jsonl" % (split,self.config.name,lvl)) \
|
129 |
+
for lvl in range(11)
|
130 |
+
] + [
|
131 |
+
("challenge_tdiv_%d" % lvl,"test-%s_tdiv_%d.jsonl" % (self.config.name,lvl)) \
|
132 |
+
for lvl in range(4)
|
133 |
]
|
134 |
+
|
135 |
|
136 |
return [
|
137 |
datasets.SplitGenerator(
|
|
|
176 |
# This method handles input defined in _split_generators to yield (key, example) tuples from the dataset.
|
177 |
# The `key` is here for legacy reason (tfds) and is not important in itself.
|
178 |
|
179 |
+
for x in ["train","valid","test"]:
|
180 |
+
if x in split: p_split=x; break
|
181 |
with open(filepath, encoding="utf-8") as f:
|
182 |
+
for id_, row in enumerate(f):
|
183 |
data = json.loads(row)
|
184 |
+
data["gem_parent_id"] = "GEM-wiki_cat_sum-%s-%d" % (split,data["id"]+1)
|
185 |
data["gem_id"] = "GEM-wiki_cat_sum-%s-%d" % (split,data["id"]+1)
|
186 |
+
yield id_,data
|