Commit
·
c99e5ac
1
Parent(s):
fa992dd
Controlled-Text-Reduction-dataset.py
CHANGED
|
@@ -360,9 +360,8 @@ class ControlledTectReduction(datasets.GeneratorBasedBuilder):
|
|
| 360 |
{
|
| 361 |
"doc_text": datasets.Value("string"),
|
| 362 |
"summary_text": datasets.Value("string"),
|
| 363 |
-
"
|
| 364 |
}
|
| 365 |
-
|
| 366 |
)
|
| 367 |
return datasets.DatasetInfo(
|
| 368 |
# This is the description that will appear on the datasets page.
|
|
@@ -420,6 +419,6 @@ class ControlledTectReduction(datasets.GeneratorBasedBuilder):
|
|
| 420 |
df = pd.concat([pd.read_csv(fn) for fn in filepaths])
|
| 421 |
for counter, dic in enumerate(df.to_dict('records')):
|
| 422 |
columns_to_load_into_object = ["doc_text", "summary_text", "highlight_spans"]
|
| 423 |
-
for key in columns_to_load_into_object:
|
| 424 |
-
|
| 425 |
yield counter, dic
|
|
|
|
| 360 |
{
|
| 361 |
"doc_text": datasets.Value("string"),
|
| 362 |
"summary_text": datasets.Value("string"),
|
| 363 |
+
"highlight_spans": datasets.Value("string"),
|
| 364 |
}
|
|
|
|
| 365 |
)
|
| 366 |
return datasets.DatasetInfo(
|
| 367 |
# This is the description that will appear on the datasets page.
|
|
|
|
| 419 |
df = pd.concat([pd.read_csv(fn) for fn in filepaths])
|
| 420 |
for counter, dic in enumerate(df.to_dict('records')):
|
| 421 |
columns_to_load_into_object = ["doc_text", "summary_text", "highlight_spans"]
|
| 422 |
+
# for key in columns_to_load_into_object:
|
| 423 |
+
# dic[key] = eval(dic[key])
|
| 424 |
yield counter, dic
|