Datasets:
GEM
/

Modalities:
Text
Languages:
English
ArXiv:
Libraries:
Datasets
License:
ronaldahmed commited on
Commit
974e002
1 Parent(s): eb32279

challenge sets: abstractivity and topic diversity

Browse files
Files changed (1) hide show
  1. wiki_cat_sum.py +6 -4
wiki_cat_sum.py CHANGED
@@ -127,7 +127,7 @@ class WikiCatSum(datasets.GeneratorBasedBuilder):
127
  ("challenge_test_abstractivity_%d" % lvl,"test-%s_nv_%d.jsonl" % (self.config.name,lvl)) \
128
  for lvl in range(11)
129
  ] + [
130
- ("challenge_test_topic-diversity_%d" % lvl,"test-%s_tdiv_%d.jsonl" % (self.config.name,lvl)) \
131
  for lvl in range(4)
132
  ]
133
 
@@ -154,7 +154,7 @@ class WikiCatSum(datasets.GeneratorBasedBuilder):
154
  # These kwargs will be passed to _generate_examples
155
  gen_kwargs={
156
  "filepath": os.path.join(data_dir, "valid-%s.jsonl" % (self.config.name)),
157
- "split": "dev",
158
  },
159
  ),
160
  ] + [
@@ -178,6 +178,8 @@ class WikiCatSum(datasets.GeneratorBasedBuilder):
178
  with open(filepath, encoding="utf-8") as f:
179
  for id_, row in enumerate(f):
180
  data = json.loads(row)
181
- data["gem_parent_id"] = "GEM-wiki_cat_sum-%s-%d" % (split,data["id"]+1)
182
- data["gem_id"] = "GEM-wiki_cat_sum-%s-%d" % (split,data["id"]+1)
 
 
183
  yield id_,data
 
127
  ("challenge_test_abstractivity_%d" % lvl,"test-%s_nv_%d.jsonl" % (self.config.name,lvl)) \
128
  for lvl in range(11)
129
  ] + [
130
+ ("challenge_test_topic_diversity_%d" % lvl,"test-%s_tdiv_%d.jsonl" % (self.config.name,lvl)) \
131
  for lvl in range(4)
132
  ]
133
 
 
154
  # These kwargs will be passed to _generate_examples
155
  gen_kwargs={
156
  "filepath": os.path.join(data_dir, "valid-%s.jsonl" % (self.config.name)),
157
+ "split": "validation",
158
  },
159
  ),
160
  ] + [
 
178
  with open(filepath, encoding="utf-8") as f:
179
  for id_, row in enumerate(f):
180
  data = json.loads(row)
181
+ # data["gem_parent_id"] = "GEM-wiki_cat_sum-%s-%d" % (split,data["id"]+1)
182
+ # data["gem_id"] = "GEM-wiki_cat_sum-%s-%d" % (split,data["id"]+1)
183
+ data["gem_parent_id"] = f"{self.config.name}-{split}-{id_+1}"
184
+ data["gem_id"] = f"{self.config.name}-{split}-{id_+1}"
185
  yield id_,data