Update ukrainian-news.py
Browse files- ukrainian-news.py +3 -1
ukrainian-news.py
CHANGED
@@ -54,8 +54,10 @@ class UkrainianNews(datasets.GeneratorBasedBuilder):
|
|
54 |
def _generate_examples(self, filepaths):
|
55 |
"""This function returns the examples in the raw (text) form."""
|
56 |
logger.info("generating examples from = %s", filepaths)
|
|
|
57 |
for path in filepaths:
|
58 |
with open(path, encoding="utf-8") as f:
|
59 |
for news_str in f:
|
60 |
news = json.loads(news_str)
|
61 |
-
yield
|
|
|
|
54 |
def _generate_examples(self, filepaths):
|
55 |
"""This function returns the examples in the raw (text) form."""
|
56 |
logger.info("generating examples from = %s", filepaths)
|
57 |
+
key = 0
|
58 |
for path in filepaths:
|
59 |
with open(path, encoding="utf-8") as f:
|
60 |
for news_str in f:
|
61 |
news = json.loads(news_str)
|
62 |
+
yield key, news
|
63 |
+
k += 1
|