Datasets:
Tasks:
Text Classification
Modalities:
Text
Formats:
json
Sub-tasks:
sentiment-classification
Languages:
Russian
Size:
10K - 100K
License:
Update kinopoisk.py
Browse files- kinopoisk.py +4 -1
kinopoisk.py
CHANGED
@@ -48,8 +48,11 @@ class Kinopoisk(datasets.GeneratorBasedBuilder):
|
|
48 |
# datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
49 |
# datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
50 |
#]
|
|
|
|
|
|
|
51 |
return [
|
52 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath":
|
53 |
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": []}),
|
54 |
]
|
55 |
|
|
|
48 |
# datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": downloaded_files["train"]}),
|
49 |
# datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": downloaded_files["dev"]}),
|
50 |
#]
|
51 |
+
df = pd.read_json(filepath, lines=True, nrows=100)
|
52 |
+
rows = df.to_dict(orient="records")
|
53 |
+
|
54 |
return [
|
55 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": rows}),
|
56 |
datasets.SplitGenerator(name=datasets.Split.VALIDATION, gen_kwargs={"filepath": []}),
|
57 |
]
|
58 |
|