Update lextreme.py
Browse files- lextreme.py +6 -21
lextreme.py
CHANGED
@@ -4143,17 +4143,6 @@ class LEXTREME(datasets.GeneratorBasedBuilder):
|
|
4143 |
LextremeConfig(name="greek_legal_code_chapter", **_GREEK_LEGAL_CODE_CHAPTER),
|
4144 |
LextremeConfig(name="greek_legal_code_subject", **_GREEK_LEGAL_CODE_SUBJECT),
|
4145 |
LextremeConfig(name="online_terms_of_service_unfairness_levels", **_ONLINE_TERMS_OF_SERVICE_UNFAIRNESS_LEVELS),
|
4146 |
-
LextremeConfig(name="turkish_constitutional_court_decisions_judgment", **_TURKISH_CONSTITUTIONAL_COURT_DECISIONS_JUDGMENT),
|
4147 |
-
LextremeConfig(name="swiss_criticality_prediction_bge_facts", **_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS),
|
4148 |
-
LextremeConfig(name="swiss_criticality_prediction_bge_considerations", **_SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS),
|
4149 |
-
LextremeConfig(name="swiss_criticality_prediction_citation_facts", **_SWISS_CRITICLALITY_PREDICTION_CITATION_FACTS),
|
4150 |
-
LextremeConfig(name="swiss_criticality_prediction_citation_considerations", **_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS),
|
4151 |
-
LextremeConfig(name="swiss_law_area_prediction_facts", **_SWISS_LAW_AREA_PREDICTION_FACTS),
|
4152 |
-
LextremeConfig(name="swiss_law_area_prediction_considerations", **_SWISS_LAW_AREA_PREDICTION_CONSIDERATIONS),
|
4153 |
-
LextremeConfig(name="swiss_law_area_prediction_sub_area_facts", **_SWISS_LAW_AREA_PREDICTION_SUB_AREA_FACTS),
|
4154 |
-
LextremeConfig(name="swiss_law_area_prediction_sub_area_considerations", **_SWISS_LAW_AREA_PREDICTION_SUB_AREA_CONSIDERATIONS),
|
4155 |
-
LextremeConfig(name="swiss_judgment_prediction_xl_facts", **_SWISS_JUDGMENT_PREDICTION_XL_FACTS),
|
4156 |
-
LextremeConfig(name="swiss_judgment_prediction_xl_considerations", **_SWISS_JUDGMENT_PREDICTION_XL_CONSIDERATIONS),
|
4157 |
|
4158 |
# MLTC tasks
|
4159 |
LextremeConfig(name="online_terms_of_service_clause_topics", **_ONLINE_TERMS_OF_SERVICE_CLAUSE_TOPICS),
|
@@ -4183,7 +4172,11 @@ class LEXTREME(datasets.GeneratorBasedBuilder):
|
|
4183 |
)
|
4184 |
|
4185 |
def _split_generators(self, dl_manager):
|
4186 |
-
names = ["brazilian_court_decisions_judgment", "brazilian_court_decisions_unanimity", "german_argument_mining",
|
|
|
|
|
|
|
|
|
4187 |
if self.config.name == "all":
|
4188 |
test = [dl_manager.download(os.path.join(name, "test.jsonl")) for name in names]
|
4189 |
train = [dl_manager.download(os.path.join(name, "train.jsonl")) for name in names]
|
@@ -4194,18 +4187,10 @@ class LEXTREME(datasets.GeneratorBasedBuilder):
|
|
4194 |
val = [dl_manager.download(os.path.join(self.config.name, "validation.jsonl"))]
|
4195 |
|
4196 |
return [
|
4197 |
-
datasets.SplitGenerator(
|
4198 |
-
name=datasets.Split.TRAIN,
|
4199 |
-
gen_kwargs={"files": train},
|
4200 |
-
),
|
4201 |
-
datasets.SplitGenerator(
|
4202 |
-
name=datasets.Split.VALIDATION,
|
4203 |
-
gen_kwargs={"files": val},
|
4204 |
-
),
|
4205 |
datasets.SplitGenerator(
|
4206 |
name=datasets.Split.TEST,
|
4207 |
gen_kwargs={"files": test},
|
4208 |
-
)
|
4209 |
]
|
4210 |
|
4211 |
def _generate_examples(self, files):
|
|
|
4143 |
LextremeConfig(name="greek_legal_code_chapter", **_GREEK_LEGAL_CODE_CHAPTER),
|
4144 |
LextremeConfig(name="greek_legal_code_subject", **_GREEK_LEGAL_CODE_SUBJECT),
|
4145 |
LextremeConfig(name="online_terms_of_service_unfairness_levels", **_ONLINE_TERMS_OF_SERVICE_UNFAIRNESS_LEVELS),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4146 |
|
4147 |
# MLTC tasks
|
4148 |
LextremeConfig(name="online_terms_of_service_clause_topics", **_ONLINE_TERMS_OF_SERVICE_CLAUSE_TOPICS),
|
|
|
4172 |
)
|
4173 |
|
4174 |
def _split_generators(self, dl_manager):
|
4175 |
+
names = ["brazilian_court_decisions_judgment", "brazilian_court_decisions_unanimity", "german_argument_mining",
|
4176 |
+
"greek_legal_code_chapter", "greek_legal_code_subject", "greek_legal_code_volume", "swiss_judgment_prediction",
|
4177 |
+
"online_terms_of_service_unfairness_levels", "online_terms_of_service_clause_topics", "covid19_emergency_event",
|
4178 |
+
"multi_eurlex_level_1", "multi_eurlex_level_2", "multi_eurlex_level_3", "greek_legal_ner", "legalnero", "lener_br",
|
4179 |
+
"mapa_coarse", "mapa_fine", ]
|
4180 |
if self.config.name == "all":
|
4181 |
test = [dl_manager.download(os.path.join(name, "test.jsonl")) for name in names]
|
4182 |
train = [dl_manager.download(os.path.join(name, "train.jsonl")) for name in names]
|
|
|
4187 |
val = [dl_manager.download(os.path.join(self.config.name, "validation.jsonl"))]
|
4188 |
|
4189 |
return [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4190 |
datasets.SplitGenerator(
|
4191 |
name=datasets.Split.TEST,
|
4192 |
gen_kwargs={"files": test},
|
4193 |
+
)
|
4194 |
]
|
4195 |
|
4196 |
def _generate_examples(self, files):
|