Update multi_document_summarization.py
Browse files
multi_document_summarization.py
CHANGED
@@ -85,18 +85,11 @@ class MultiDocumentSum(datasets.GeneratorBasedBuilder):
|
|
85 |
gen_kwargs={"path": val_path},
|
86 |
),
|
87 |
]
|
88 |
-
|
89 |
-
def _generate_examples(self, path=None):
|
90 |
"""Yields examples."""
|
91 |
with open(path, encoding="utf-8") as f:
|
92 |
data = json.load(f)
|
93 |
f.close()
|
94 |
|
95 |
for idx, el in enumerate(data):
|
96 |
-
'''cite_n = list(el["ref_abstract"].keys())
|
97 |
-
cite_n_mid = [el["ref_abstract"][cite]["mid"] for cite in cite_n]
|
98 |
-
cite_n_abstract = [el["ref_abstract"][cite]["abstract"] for cite in cite_n]
|
99 |
-
tmp = {"cite_N": cite_n, "mid": cite_n_mid, "abstract": cite_n_abstract}
|
100 |
-
d = el.copy()
|
101 |
-
d["summary"] = tmp'''
|
102 |
yield idx, d
|
|
|
85 |
gen_kwargs={"path": val_path},
|
86 |
),
|
87 |
]
|
88 |
+
def _generate_examples(self, path=None):
|
|
|
89 |
"""Yields examples."""
|
90 |
with open(path, encoding="utf-8") as f:
|
91 |
data = json.load(f)
|
92 |
f.close()
|
93 |
|
94 |
for idx, el in enumerate(data):
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
yield idx, d
|