Commit ·
576973f
1
Parent(s): 70fe851
updated the script
Browse files
Controlled-Text-Reduction-dataset.py
CHANGED
|
@@ -347,7 +347,7 @@ class ControlledTectReduction(datasets.GeneratorBasedBuilder):
|
|
| 347 |
|
| 348 |
BUILDER_CONFIGS = [
|
| 349 |
datasets.BuilderConfig(
|
| 350 |
-
name="plain_text", version=VERSION, description="This provides the
|
| 351 |
),
|
| 352 |
]
|
| 353 |
|
|
@@ -417,7 +417,7 @@ class ControlledTectReduction(datasets.GeneratorBasedBuilder):
|
|
| 417 |
""" Yields Controlled Text Reduction examples from a csv file. Each instance contains the document, the summary and the pre-selected spans."""
|
| 418 |
|
| 419 |
# merge annotations from sections
|
| 420 |
-
df = pd.read_csv(filepath
|
| 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:
|
|
|
|
| 347 |
|
| 348 |
BUILDER_CONFIGS = [
|
| 349 |
datasets.BuilderConfig(
|
| 350 |
+
name="plain_text", version=VERSION, description="This provides the Controlled Text Reduction dataset"
|
| 351 |
),
|
| 352 |
]
|
| 353 |
|
|
|
|
| 417 |
""" Yields Controlled Text Reduction examples from a csv file. Each instance contains the document, the summary and the pre-selected spans."""
|
| 418 |
|
| 419 |
# merge annotations from sections
|
| 420 |
+
df = pd.read_csv(filepath)
|
| 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:
|