add four criticality_prediction configurations
Browse filesNew configs:
1. _SWISS_CRITICLALITY_PREDICTION_BGE_FACTS
2. _SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS
3. _SWISS_CRITICLALITY_PREDICTION_CITATION_FACTS
4. _SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS
- lextreme.py +53 -0
lextreme.py
CHANGED
@@ -161,6 +161,53 @@ _SWISS_JUDGMENT_PREDICTION = {
|
|
161 |
,
|
162 |
"label_classes": ["dismissal", "approval"],
|
163 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
164 |
_GERMAN_ARGUMENT_MINING = {
|
165 |
"task_type": TaskType.SLTC,
|
166 |
"hf_hub_name": "joelito/german_argument_mining",
|
@@ -4053,6 +4100,11 @@ class LEXTREME(datasets.GeneratorBasedBuilder):
|
|
4053 |
LextremeConfig(name="greek_legal_code_subject", **_GREEK_LEGAL_CODE_SUBJECT),
|
4054 |
LextremeConfig(name="online_terms_of_service_unfairness_levels", **_ONLINE_TERMS_OF_SERVICE_UNFAIRNESS_LEVELS),
|
4055 |
LextremeConfig(name="turkish_constitutional_court_decisions_judgment", **_TURKISH_CONSTITUTIONAL_COURT_DECISIONS_JUDGMENT),
|
|
|
|
|
|
|
|
|
|
|
4056 |
# MLTC tasks
|
4057 |
LextremeConfig(name="online_terms_of_service_clause_topics", **_ONLINE_TERMS_OF_SERVICE_CLAUSE_TOPICS),
|
4058 |
LextremeConfig(name="covid19_emergency_event", **_COVID19_EMERGENCY_EVENT),
|
@@ -4129,3 +4181,4 @@ class LEXTREME(datasets.GeneratorBasedBuilder):
|
|
4129 |
"label": label,
|
4130 |
"language": language,
|
4131 |
}
|
|
|
|
161 |
,
|
162 |
"label_classes": ["dismissal", "approval"],
|
163 |
}
|
164 |
+
|
165 |
+
_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS = {
|
166 |
+
"task_type": TaskType.SLTC,
|
167 |
+
"hf_hub_name": "rcds/legal_criticaliy_prediction",
|
168 |
+
"url": "https://huggingface.co/datasets/rcds/legal_criticality_prediction",
|
169 |
+
"input_col": "facts",
|
170 |
+
"label_col": "bge_label",
|
171 |
+
"description":
|
172 |
+
"""
|
173 |
+
Legal Criticality Prediction (LCP) is a multilingual, diachronic dataset of 130K Swiss Federal Supreme Court (FSCS) cases annotated with two criticality labels. The bge_label is a binary label (critical, non-critical), while the citation label has 5 classes (critical-1, critical-2, critical-3, critical-4, non-critical). Critical classes of the citation_label are distinct subsets of the critical class of the bge_label. This dataset creates a challenging text classification task. We also provide additional metadata as the publication year, the law area and the canton of origin per case, to promote robustness and fairness studies on the critical area of legal NLP.
|
174 |
+
"""
|
175 |
+
,
|
176 |
+
"citation":
|
177 |
+
"""
|
178 |
+
@InProceedings{niklaus-etal-2021-swiss,
|
179 |
+
author = {Stern, Ronja
|
180 |
+
and Niklaus, Joel
|
181 |
+
and Stürmer, Matthias},
|
182 |
+
title = {Title: Subtitle},
|
183 |
+
booktitle = {booktitle},
|
184 |
+
year = {2023},
|
185 |
+
location = {Bern, Switzerland},
|
186 |
+
}
|
187 |
+
"""
|
188 |
+
,
|
189 |
+
"label_classes": ["critical", "non-critical"],
|
190 |
+
}
|
191 |
+
|
192 |
+
_SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS = {
|
193 |
+
**_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS,
|
194 |
+
"input_col": "considerations",
|
195 |
+
"label_col": "bge_label",
|
196 |
+
"label_classes": ["critical", "non-critical"],
|
197 |
+
}
|
198 |
+
_SWISS_CRITICLALITY_PREDICTION_CITATION_FACTS = {
|
199 |
+
**_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS,
|
200 |
+
"input_col": "facts",
|
201 |
+
"label_col": "citation_label",
|
202 |
+
"label_classes": ["critical-1", "critical-2", "critical-3", "critical-4", "non-critical"],
|
203 |
+
}
|
204 |
+
_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS = {
|
205 |
+
**_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS,
|
206 |
+
"input_col": "considerations",
|
207 |
+
"label_col": "citation_label",
|
208 |
+
"label_classes": ["critical-1", "critical-2", "critical-3", "critical-4", "non-critical"],
|
209 |
+
}
|
210 |
+
|
211 |
_GERMAN_ARGUMENT_MINING = {
|
212 |
"task_type": TaskType.SLTC,
|
213 |
"hf_hub_name": "joelito/german_argument_mining",
|
|
|
4100 |
LextremeConfig(name="greek_legal_code_subject", **_GREEK_LEGAL_CODE_SUBJECT),
|
4101 |
LextremeConfig(name="online_terms_of_service_unfairness_levels", **_ONLINE_TERMS_OF_SERVICE_UNFAIRNESS_LEVELS),
|
4102 |
LextremeConfig(name="turkish_constitutional_court_decisions_judgment", **_TURKISH_CONSTITUTIONAL_COURT_DECISIONS_JUDGMENT),
|
4103 |
+
LextremeConfig(name="swiss_criticality_prediction_bge_facts", **_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS),
|
4104 |
+
LextremeConfig(name="swiss_criticality_prediction_bge_considerations", **_SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS),
|
4105 |
+
LextremeConfig(name="swiss_criticality_prediction_citation_facts", **_SWISS_CRITICLALITY_PREDICTION_CITATION_FACTS),
|
4106 |
+
LextremeConfig(name="swiss_criticality_prediction_citation_considerations", **_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS),
|
4107 |
+
|
4108 |
# MLTC tasks
|
4109 |
LextremeConfig(name="online_terms_of_service_clause_topics", **_ONLINE_TERMS_OF_SERVICE_CLAUSE_TOPICS),
|
4110 |
LextremeConfig(name="covid19_emergency_event", **_COVID19_EMERGENCY_EVENT),
|
|
|
4181 |
"label": label,
|
4182 |
"language": language,
|
4183 |
}
|
4184 |
+
|