Script fixes
Browse files
rulm.py
CHANGED
@@ -62,7 +62,11 @@ class RuLMDataset(datasets.GeneratorBasedBuilder):
|
|
62 |
def _info(self):
|
63 |
features = datasets.Features(
|
64 |
{
|
65 |
-
|
|
|
|
|
|
|
|
|
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_,
|
|
|
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
|