Update persian_poetry.py
Browse files- persian_poetry.py +12 -11
persian_poetry.py
CHANGED
@@ -24,17 +24,18 @@ class PersianPoetry(DatasetBuilder):
|
|
24 |
citation="""Persian Poetry Dataset. Collected by Kakooch from the Ganjoor Project. Available at: https://huggingface.co/datasets/persian_poetry""",
|
25 |
)
|
26 |
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
38 |
|
39 |
def _generate_examples(self, filepath):
|
40 |
with open(filepath, encoding="utf-8") as f:
|
|
|
24 |
citation="""Persian Poetry Dataset. Collected by Kakooch from the Ganjoor Project. Available at: https://huggingface.co/datasets/persian_poetry""",
|
25 |
)
|
26 |
|
27 |
+
def _split_generators(self, dl_manager):
|
28 |
+
return [
|
29 |
+
SplitGenerator(
|
30 |
+
name=Split.TRAIN,
|
31 |
+
gen_kwargs={"filepath": "poems-train_data.jsonl"},
|
32 |
+
),
|
33 |
+
SplitGenerator(
|
34 |
+
name=Split.TEST,
|
35 |
+
gen_kwargs={"filepath": "poems-test_data.jsonl"},
|
36 |
+
),
|
37 |
+
]
|
38 |
+
|
39 |
|
40 |
def _generate_examples(self, filepath):
|
41 |
with open(filepath, encoding="utf-8") as f:
|