tobiasbrugger
commited on
Commit
•
af0f917
1
Parent(s):
b507eeb
bugfixes/improvements
Browse files- MultiLegalSBD.py +1 -8
MultiLegalSBD.py
CHANGED
@@ -90,13 +90,6 @@ class MultiLegalSBD(datasets.GeneratorBasedBuilder):
|
|
90 |
)
|
91 |
|
92 |
def _split_generators(self, dl_manager):
|
93 |
-
def download_url(filename):
|
94 |
-
url = hf_hub_url(
|
95 |
-
repo_id="tbrugger/Multilingual-SBD",
|
96 |
-
filename = f'data/{filename}.jsonl.xz',
|
97 |
-
repo_type='dataset'
|
98 |
-
)
|
99 |
-
return dl_manager.download(url)
|
100 |
|
101 |
languages = _LANGUAGES if self.config.language == "all" else [self.config.language]
|
102 |
types = _TYPES if self.config.type == 'all' else [self.config.type]
|
@@ -108,7 +101,7 @@ class MultiLegalSBD(datasets.GeneratorBasedBuilder):
|
|
108 |
for type in types:
|
109 |
for shard in range(_HIGHEST_NUMBER_OF_SHARDS):
|
110 |
try:
|
111 |
-
filepaths.append(
|
112 |
except:
|
113 |
break
|
114 |
|
|
|
90 |
)
|
91 |
|
92 |
def _split_generators(self, dl_manager):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
|
94 |
languages = _LANGUAGES if self.config.language == "all" else [self.config.language]
|
95 |
types = _TYPES if self.config.type == 'all' else [self.config.type]
|
|
|
101 |
for type in types:
|
102 |
for shard in range(_HIGHEST_NUMBER_OF_SHARDS):
|
103 |
try:
|
104 |
+
filepaths.append(dl_manager.download((f'data/{language}_{type}_{shard}.jsonl.xz')))
|
105 |
except:
|
106 |
break
|
107 |
|