Datasets:

dibyaaaaax commited on
Commit
347e24f
1 Parent(s): fc9de8d

Update openkp.py

Browse files
Files changed (1) hide show
  1. openkp.py +3 -3
openkp.py CHANGED
@@ -132,20 +132,20 @@ class OpenKP(datasets.GeneratorBasedBuilder):
132
  if self.config.name == "extraction":
133
  # Yields examples as (key, example) tuples
134
  yield key, {
135
- "id": data['paper_id'],
136
  "document": data["document"],
137
  "doc_bio_tags": data.get("doc_bio_tags")
138
  }
139
  elif self.config.name == "generation":
140
  yield key, {
141
- "id": data['paper_id'],
142
  "document": data["document"],
143
  "extractive_keyphrases": data.get("extractive_keyphrases"),
144
  "abstractive_keyphrases": data.get("abstractive_keyphrases")
145
  }
146
  else:
147
  yield key, {
148
- "id": data['paper_id'],
149
  "document": data["document"],
150
  "doc_bio_tags": data.get("doc_bio_tags"),
151
  "extractive_keyphrases": data.get("extractive_keyphrases"),
 
132
  if self.config.name == "extraction":
133
  # Yields examples as (key, example) tuples
134
  yield key, {
135
+ "id": data.get('paper_id'),
136
  "document": data["document"],
137
  "doc_bio_tags": data.get("doc_bio_tags")
138
  }
139
  elif self.config.name == "generation":
140
  yield key, {
141
+ "id": data.get('paper_id'),
142
  "document": data["document"],
143
  "extractive_keyphrases": data.get("extractive_keyphrases"),
144
  "abstractive_keyphrases": data.get("abstractive_keyphrases")
145
  }
146
  else:
147
  yield key, {
148
+ "id": data.get('paper_id'),
149
  "document": data["document"],
150
  "doc_bio_tags": data.get("doc_bio_tags"),
151
  "extractive_keyphrases": data.get("extractive_keyphrases"),