Datasets:
Update long-summarization-persian.py
Browse files
long-summarization-persian.py
CHANGED
@@ -14,7 +14,6 @@
|
|
14 |
|
15 |
|
16 |
import csv
|
17 |
-
import json
|
18 |
import os
|
19 |
|
20 |
import datasets
|
@@ -83,7 +82,7 @@ class long_summarization_persian(datasets.GeneratorBasedBuilder):
|
|
83 |
def _generate_examples(self, filepath):
|
84 |
"""This function returns the examples in the raw (text) form."""
|
85 |
with open(filepath, encoding="utf-8") as f:
|
86 |
-
data =
|
87 |
for id_, article in enumerate(data):
|
88 |
article = article["article"]
|
89 |
summary = article["summary"]
|
|
|
14 |
|
15 |
|
16 |
import csv
|
|
|
17 |
import os
|
18 |
|
19 |
import datasets
|
|
|
82 |
def _generate_examples(self, filepath):
|
83 |
"""This function returns the examples in the raw (text) form."""
|
84 |
with open(filepath, encoding="utf-8") as f:
|
85 |
+
data = csv.load(f)
|
86 |
for id_, article in enumerate(data):
|
87 |
article = article["article"]
|
88 |
summary = article["summary"]
|