zeusfsx commited on
Commit
a4e9cb5
1 Parent(s): 32237b2

Update ukrainian-news.py

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