dibyaaaaax
commited on
Commit
•
1d79827
1
Parent(s):
c7e02ef
Update kptimes.py
Browse files- kptimes.py +3 -3
kptimes.py
CHANGED
@@ -133,20 +133,20 @@ class KPTimes(datasets.GeneratorBasedBuilder):
|
|
133 |
if self.config.name == "extraction":
|
134 |
# Yields examples as (key, example) tuples
|
135 |
yield key, {
|
136 |
-
"id": data
|
137 |
"document": data["document"],
|
138 |
"doc_bio_tags": data.get("doc_bio_tags")
|
139 |
}
|
140 |
elif self.config.name == "generation":
|
141 |
yield key, {
|
142 |
-
"id": data
|
143 |
"document": data["document"],
|
144 |
"extractive_keyphrases": data.get("extractive_keyphrases"),
|
145 |
"abstractive_keyphrases": data.get("abstractive_keyphrases")
|
146 |
}
|
147 |
else:
|
148 |
yield key, {
|
149 |
-
"id": data
|
150 |
"document": data["document"],
|
151 |
"doc_bio_tags": data.get("doc_bio_tags"),
|
152 |
"extractive_keyphrases": data.get("extractive_keyphrases"),
|
|
|
133 |
if self.config.name == "extraction":
|
134 |
# Yields examples as (key, example) tuples
|
135 |
yield key, {
|
136 |
+
"id": data.get('paper_id'),
|
137 |
"document": data["document"],
|
138 |
"doc_bio_tags": data.get("doc_bio_tags")
|
139 |
}
|
140 |
elif self.config.name == "generation":
|
141 |
yield key, {
|
142 |
+
"id": data.get('paper_id'),
|
143 |
"document": data["document"],
|
144 |
"extractive_keyphrases": data.get("extractive_keyphrases"),
|
145 |
"abstractive_keyphrases": data.get("abstractive_keyphrases")
|
146 |
}
|
147 |
else:
|
148 |
yield key, {
|
149 |
+
"id": data.get('paper_id'),
|
150 |
"document": data["document"],
|
151 |
"doc_bio_tags": data.get("doc_bio_tags"),
|
152 |
"extractive_keyphrases": data.get("extractive_keyphrases"),
|