Datasets:
edit script for dataurl1
Browse files- persian_news_dataset.py +3 -3
persian_news_dataset.py
CHANGED
@@ -10,7 +10,7 @@ _CITATION = """"""
|
|
10 |
# _URL = "https://drive.google.com/uc?export=download&id=1yrTpPZLdb1e6LHqKJfOT3RxRUQBBNEQn" ## SAMPLE
|
11 |
# _URL = "https://drive.google.com/uc?export=download&id=1-6oAYd6UQuuAkTAHEkToCg_Q5cJ2wXi-"
|
12 |
# _URL = "https://github.com/saied71/persian_news_dataset/blob/dev/sample_new.csv.zip?raw=true"
|
13 |
-
_URL = "persian_news_dataset.
|
14 |
|
15 |
|
16 |
|
@@ -35,12 +35,12 @@ class Persian_news(datasets.GeneratorBasedBuilder):
|
|
35 |
def _split_generators(self, dl_manager):
|
36 |
"""Returns SplitGenerators."""
|
37 |
dl_dir = dl_manager.download_and_extract(_URL)
|
38 |
-
|
39 |
return [
|
40 |
datasets.SplitGenerator(
|
41 |
name=datasets.Split.TRAIN,
|
42 |
gen_kwargs={
|
43 |
-
"filepath":
|
44 |
},),]
|
45 |
|
46 |
def _generate_examples(self, filepath):
|
|
|
10 |
# _URL = "https://drive.google.com/uc?export=download&id=1yrTpPZLdb1e6LHqKJfOT3RxRUQBBNEQn" ## SAMPLE
|
11 |
# _URL = "https://drive.google.com/uc?export=download&id=1-6oAYd6UQuuAkTAHEkToCg_Q5cJ2wXi-"
|
12 |
# _URL = "https://github.com/saied71/persian_news_dataset/blob/dev/sample_new.csv.zip?raw=true"
|
13 |
+
_URL = "persian_news_dataset.zip"
|
14 |
|
15 |
|
16 |
|
|
|
35 |
def _split_generators(self, dl_manager):
|
36 |
"""Returns SplitGenerators."""
|
37 |
dl_dir = dl_manager.download_and_extract(_URL)
|
38 |
+
data_dir = os.path.join(dl_dir, "persian_news_dataset.csv")
|
39 |
return [
|
40 |
datasets.SplitGenerator(
|
41 |
name=datasets.Split.TRAIN,
|
42 |
gen_kwargs={
|
43 |
+
"filepath": data_dir,
|
44 |
},),]
|
45 |
|
46 |
def _generate_examples(self, filepath):
|