kakooch commited on
Commit
e33effd
1 Parent(s): c8cf32d

Update persian_poetry.py

Browse files
Files changed (1) hide show
  1. 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
- def _split_generators(self, dl_manager):
28
- # You need to download and extract the data manually and place it in the path defined below.
29
- local_path = "/path/to/your/dataset.jsonl"
30
- return [
31
- SplitGenerator(
32
- name=Split.TRAIN,
33
- gen_kwargs={
34
- "filepath": local_path
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: