Datasets:
Tasks:
Summarization
Modalities:
Text
Sub-tasks:
news-articles-summarization
Languages:
Hebrew
Size:
100K - 1M
License:
imvladikon
commited on
Commit
•
76caff6
1
Parent(s):
f01a46e
Update hebrew_news.py
Browse files- hebrew_news.py +3 -3
hebrew_news.py
CHANGED
@@ -68,9 +68,9 @@ class HebrewNews(datasets.GeneratorBasedBuilder):
|
|
68 |
|
69 |
def _generate_examples(self, archive_iter):
|
70 |
for filepath, f in archive_iter:
|
71 |
-
|
72 |
-
fieldnames = ["articleBody", "description", "headline", "title"]
|
73 |
-
reader = csv.DictReader(
|
74 |
next(reader)
|
75 |
for idx, row in enumerate(reader):
|
76 |
yield idx, {
|
|
|
68 |
|
69 |
def _generate_examples(self, archive_iter):
|
70 |
for filepath, f in archive_iter:
|
71 |
+
file_iter = (line.decode("utf-8") for line in f)
|
72 |
+
fieldnames = ["articleBody", "description", "headline", "title"]
|
73 |
+
reader = csv.DictReader(file_iter, delimiter=",", fieldnames=fieldnames)
|
74 |
next(reader)
|
75 |
for idx, row in enumerate(reader):
|
76 |
yield idx, {
|