Datasets:
GEM
/

Modalities:
Text
Languages:
English
ArXiv:
Libraries:
Datasets
License:
ronaldahmed commited on
Commit
d648ad0
1 Parent(s): 49ac8b1

challenge sets: abstractivity and topic diversity

Browse files
Files changed (4) hide show
  1. animal.zip +2 -2
  2. company.zip +2 -2
  3. film.zip +2 -2
  4. 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:dd99a2a62e77cb291972bd5b51097c4619ce37ca86dab28a2cd6cb63cfc8198e
3
- size 493575209
 
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:9856c544319077b62bbb6c940daa7a9e53b179cee7bb84f5d731f65735e22e33
3
- size 872354086
 
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:62ca469c0a6bb5e01dbbff8a1f7e34a45b7b827ffc5dd358b10e42ebf6980a37
3
- size 859086412
 
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
- ("challenge_%s_nov_%s" % (split,lvl),"%s-%s_nv2_%s.jsonl" % (split,self.config.name,lvl)) \
127
- for split in ["train","valid","test"] for lvl in ["low","mid","high"]
 
 
 
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 data["id"],data
 
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