Update ai_hub_summarization.py
Browse files- ai_hub_summarization.py +12 -2
ai_hub_summarization.py
CHANGED
@@ -34,8 +34,13 @@ class AiHubSummarization(datasets.GeneratorBasedBuilder):
|
|
34 |
description=_DESCRIPTION,
|
35 |
features=datasets.Features(
|
36 |
{
|
|
|
|
|
|
|
|
|
37 |
"passage": datasets.Value("string"),
|
38 |
"abstract_summary": datasets.Value("string"),
|
|
|
39 |
}
|
40 |
),
|
41 |
license=_LICENSE,
|
@@ -73,8 +78,13 @@ class AiHubSummarization(datasets.GeneratorBasedBuilder):
|
|
73 |
if idx == 0:
|
74 |
continue
|
75 |
features = {
|
76 |
-
"
|
77 |
-
"
|
|
|
|
|
|
|
|
|
|
|
78 |
}
|
79 |
yield idx, features
|
80 |
idx += 1
|
|
|
34 |
description=_DESCRIPTION,
|
35 |
features=datasets.Features(
|
36 |
{
|
37 |
+
"data_name": datasets.Value("string"),
|
38 |
+
"doc_id": datasets.Value("string"),
|
39 |
+
"passage_id": datasets.Value("string"),
|
40 |
+
"doc_name": datasets.Value("string"),
|
41 |
"passage": datasets.Value("string"),
|
42 |
"abstract_summary": datasets.Value("string"),
|
43 |
+
"extract_summary": datasets.Value("string"),
|
44 |
}
|
45 |
),
|
46 |
license=_LICENSE,
|
|
|
78 |
if idx == 0:
|
79 |
continue
|
80 |
features = {
|
81 |
+
"data_name": row[0],
|
82 |
+
"doc_id": row[1],
|
83 |
+
"passage_id": row[2],
|
84 |
+
"doc_name": row[3],
|
85 |
+
"passage": row[4],
|
86 |
+
"abstract_summary": row[5],
|
87 |
+
"extract_summary": row[6],
|
88 |
}
|
89 |
yield idx, features
|
90 |
idx += 1
|