dibyaaaaax
commited on
Commit
•
347e24f
1
Parent(s):
fc9de8d
Update openkp.py
Browse files
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
|
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
|
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
|
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"),
|