IlyaGusev commited on
Commit
193e982
1 Parent(s): 1cff822

Script fixes

Browse files
Files changed (1) hide show
  1. rulm.py +6 -2
rulm.py CHANGED
@@ -62,7 +62,11 @@ class RuLMDataset(datasets.GeneratorBasedBuilder):
62
  def _info(self):
63
  features = datasets.Features(
64
  {
65
- _TEXT: datasets.Value("string")
 
 
 
 
66
  }
67
  )
68
  return datasets.DatasetInfo(
@@ -88,4 +92,4 @@ class RuLMDataset(datasets.GeneratorBasedBuilder):
88
  reader_stream = io.BufferedReader(cctx.stream_reader(f))
89
  reader = jsonlines.Reader(reader_stream, loads=parse_json)
90
  for id_, item in enumerate(reader):
91
- yield id_, {"text": item["text"]}
 
62
  def _info(self):
63
  features = datasets.Features(
64
  {
65
+ "text": datasets.Value("string"),
66
+ "meta": {
67
+ "source": datasets.Value("string"),
68
+ "url": datasets.Value("string")
69
+ }
70
  }
71
  )
72
  return datasets.DatasetInfo(
 
92
  reader_stream = io.BufferedReader(cctx.stream_reader(f))
93
  reader = jsonlines.Reader(reader_stream, loads=parse_json)
94
  for id_, item in enumerate(reader):
95
+ yield id_, item