Datasets:
Update sentiment_digikala_snappfood.py
Browse files
sentiment_digikala_snappfood.py
CHANGED
@@ -46,14 +46,11 @@ class SentimentDigikalaSnappfood(datasets.GeneratorBasedBuilder):
|
|
46 |
)
|
47 |
|
48 |
def _split_generators(self, dl_manager):
|
49 |
-
|
|
|
50 |
return [
|
51 |
-
datasets.SplitGenerator(
|
52 |
-
|
53 |
-
),
|
54 |
-
datasets.SplitGenerator(
|
55 |
-
name=datasets.Split.TEST, gen_kwargs={"files": dl_manager.iter_archive(archive), "split": "test"}
|
56 |
-
),
|
57 |
]
|
58 |
|
59 |
def _generate_examples(self, filepath):
|
|
|
46 |
)
|
47 |
|
48 |
def _split_generators(self, dl_manager):
|
49 |
+
train_path = dl_manager.download_and_extract(_TRAIN_DOWNLOAD_URL)
|
50 |
+
test_path = dl_manager.download_and_extract(_TEST_DOWNLOAD_URL)
|
51 |
return [
|
52 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepath": train_path}),
|
53 |
+
datasets.SplitGenerator(name=datasets.Split.TEST, gen_kwargs={"filepath": test_path}),
|
|
|
|
|
|
|
|
|
54 |
]
|
55 |
|
56 |
def _generate_examples(self, filepath):
|