Datasets:
davebulaval
commited on
Commit
•
2493729
1
Parent(s):
4b39307
Upload RISCBAC.py
Browse files- RISCBAC.py +4 -8
RISCBAC.py
CHANGED
@@ -44,10 +44,7 @@ _HOMEPAGE = "https://huggingface.co/datasets/davebulaval/RISCBAC"
|
|
44 |
|
45 |
_LICENSE = "Attribution 4.0 International (CC BY 4.0)"
|
46 |
|
47 |
-
|
48 |
-
"en": "https://huggingface.co/datasets/davebulaval/RISCBAC/blob/main/en.jsonl",
|
49 |
-
"fr": "https://huggingface.co/datasets/davebulaval/RISCBAC/blob/main/fr.jsonl",
|
50 |
-
}
|
51 |
|
52 |
|
53 |
class RISCBAC(datasets.GeneratorBasedBuilder):
|
@@ -82,20 +79,19 @@ class RISCBAC(datasets.GeneratorBasedBuilder):
|
|
82 |
)
|
83 |
|
84 |
def _split_generators(self, dl_manager):
|
85 |
-
|
86 |
-
file_path = dl_manager.download_and_extract(url)
|
87 |
if self.config.name == "en":
|
88 |
return [
|
89 |
datasets.SplitGenerator(
|
90 |
name="full_en",
|
91 |
-
gen_kwargs={"filepath":
|
92 |
)
|
93 |
]
|
94 |
elif self.config.name == "fr":
|
95 |
return [
|
96 |
datasets.SplitGenerator(
|
97 |
name="full_fr",
|
98 |
-
gen_kwargs={"filepath":
|
99 |
),
|
100 |
]
|
101 |
else:
|
|
|
44 |
|
45 |
_LICENSE = "Attribution 4.0 International (CC BY 4.0)"
|
46 |
|
47 |
+
_URL = "https://huggingface.co/datasets/davebulaval/RISCBAC/blob/main/riscbac.zip"
|
|
|
|
|
|
|
48 |
|
49 |
|
50 |
class RISCBAC(datasets.GeneratorBasedBuilder):
|
|
|
79 |
)
|
80 |
|
81 |
def _split_generators(self, dl_manager):
|
82 |
+
data_dir = dl_manager.download_and_extract(_URL)
|
|
|
83 |
if self.config.name == "en":
|
84 |
return [
|
85 |
datasets.SplitGenerator(
|
86 |
name="full_en",
|
87 |
+
gen_kwargs={"filepath": os.path.join(data_dir, "en.jsonl")},
|
88 |
)
|
89 |
]
|
90 |
elif self.config.name == "fr":
|
91 |
return [
|
92 |
datasets.SplitGenerator(
|
93 |
name="full_fr",
|
94 |
+
gen_kwargs={"filepath": os.path.join(data_dir, "fr.jsonl")},
|
95 |
),
|
96 |
]
|
97 |
else:
|