Update inspec.py
Browse files
inspec.py
CHANGED
@@ -135,33 +135,33 @@ class TestLDKP(datasets.GeneratorBasedBuilder):
|
|
135 |
if self.config.name == "extraction":
|
136 |
# Yields examples as (key, example) tuples
|
137 |
yield key, {
|
138 |
-
"id": data['paper_id']
|
139 |
"document": data["document"],
|
140 |
"BIO_tags": data["document_tags"]
|
141 |
}
|
142 |
elif self.config.name == "ldkp_extraction":
|
143 |
yield key, {
|
144 |
-
"id": data['paper_id']
|
145 |
"document": data["document"]+data["other_metadata"]['text'],
|
146 |
"BIO_tags": data["document_tags"] + data["other_metadata"]['tags']
|
147 |
}
|
148 |
elif self.config.name == "ldkp_generation":
|
149 |
yield key, {
|
150 |
-
"id": data['paper_id']
|
151 |
"document": data["document"]+data["other_metadata"]['text'],
|
152 |
"extractive_keyphrases": data["extractive_keyphrases"],
|
153 |
"abstractive_keyphrases": data["abstractive_keyphrases"]
|
154 |
}
|
155 |
elif self.config.name == "generation":
|
156 |
yield key, {
|
157 |
-
"id": data['paper_id']
|
158 |
"document": data["document"],
|
159 |
"extractive_keyphrases": data["extractive_keyphrases"],
|
160 |
"abstractive_keyphrases": data["abstractive_keyphrases"]
|
161 |
}
|
162 |
else:
|
163 |
yield key, {
|
164 |
-
"id": data['paper_id']
|
165 |
"document": data["document"],
|
166 |
"document_tags": data["document_tags"],
|
167 |
"extractive_keyphrases": data["extractive_keyphrases"],
|
|
|
135 |
if self.config.name == "extraction":
|
136 |
# Yields examples as (key, example) tuples
|
137 |
yield key, {
|
138 |
+
"id": data['paper_id'],
|
139 |
"document": data["document"],
|
140 |
"BIO_tags": data["document_tags"]
|
141 |
}
|
142 |
elif self.config.name == "ldkp_extraction":
|
143 |
yield key, {
|
144 |
+
"id": data['paper_id'],
|
145 |
"document": data["document"]+data["other_metadata"]['text'],
|
146 |
"BIO_tags": data["document_tags"] + data["other_metadata"]['tags']
|
147 |
}
|
148 |
elif self.config.name == "ldkp_generation":
|
149 |
yield key, {
|
150 |
+
"id": data['paper_id'],
|
151 |
"document": data["document"]+data["other_metadata"]['text'],
|
152 |
"extractive_keyphrases": data["extractive_keyphrases"],
|
153 |
"abstractive_keyphrases": data["abstractive_keyphrases"]
|
154 |
}
|
155 |
elif self.config.name == "generation":
|
156 |
yield key, {
|
157 |
+
"id": data['paper_id'],
|
158 |
"document": data["document"],
|
159 |
"extractive_keyphrases": data["extractive_keyphrases"],
|
160 |
"abstractive_keyphrases": data["abstractive_keyphrases"]
|
161 |
}
|
162 |
else:
|
163 |
yield key, {
|
164 |
+
"id": data['paper_id'],
|
165 |
"document": data["document"],
|
166 |
"document_tags": data["document_tags"],
|
167 |
"extractive_keyphrases": data["extractive_keyphrases"],
|