tobiasbrugger
commited on
Commit
·
58be895
1
Parent(s):
581a7d6
update
Browse files
Multilingual-SBD.py → MultiLegalSBD.py
RENAMED
@@ -42,22 +42,21 @@ _SOURCES = [
|
|
42 |
see https://huggingface.co/datasets/joelito/MultiLegalPile_Wikipedia_Filtered/blob/main/MultiLegalPile_Wikipedia_Filtered.py
|
43 |
"""
|
44 |
_HIGHEST_NUMBER_OF_SHARDS = 4
|
45 |
-
class
|
46 |
|
47 |
def __init__(self, name:str, **kwargs):
|
48 |
-
super(
|
49 |
self.name = name
|
50 |
self.language = name.split("_")[0]
|
51 |
self.type = name.split("_")[1]
|
52 |
-
#self.source = name.split("_")[2]
|
53 |
|
54 |
-
class
|
55 |
|
56 |
|
57 |
-
BUILDER_CONFIG_CLASS =
|
58 |
|
59 |
BUILDER_CONFIGS = [
|
60 |
-
|
61 |
for language in _LANGUAGES + ['all']
|
62 |
for type in _TYPES + ["all"]
|
63 |
]
|
|
|
42 |
see https://huggingface.co/datasets/joelito/MultiLegalPile_Wikipedia_Filtered/blob/main/MultiLegalPile_Wikipedia_Filtered.py
|
43 |
"""
|
44 |
_HIGHEST_NUMBER_OF_SHARDS = 4
|
45 |
+
class MultiLegalSBDConfig(datasets.BuilderConfig):
|
46 |
|
47 |
def __init__(self, name:str, **kwargs):
|
48 |
+
super( MultiLegalSBDConfig, self).__init__(**kwargs)
|
49 |
self.name = name
|
50 |
self.language = name.split("_")[0]
|
51 |
self.type = name.split("_")[1]
|
|
|
52 |
|
53 |
+
class MultiLegalSBD(datasets.GeneratorBasedBuilder):
|
54 |
|
55 |
|
56 |
+
BUILDER_CONFIG_CLASS = MultiLegalSBDConfig
|
57 |
|
58 |
BUILDER_CONFIGS = [
|
59 |
+
MultiLegalSBDConfig(f"{language}_{type}")
|
60 |
for language in _LANGUAGES + ['all']
|
61 |
for type in _TYPES + ["all"]
|
62 |
]
|