Add criticality prediction configs
Browse files- _SWISS_CRITICLALITY_PREDICTION_BGE_FACTS
- _SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS
- _SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS
- _SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS
- lextreme.py +40 -0
lextreme.py
CHANGED
@@ -161,6 +161,41 @@ _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 +4088,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),
|
|
|
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 |
+
# TODO add citation
|
177 |
+
"label_classes": ["critical", "non-critical"],
|
178 |
+
}
|
179 |
+
|
180 |
+
_SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS = {
|
181 |
+
**_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS,
|
182 |
+
"input_col": "considerations",
|
183 |
+
"label_col": "bge_label",
|
184 |
+
"label_classes": ["critical", "non-critical"],
|
185 |
+
}
|
186 |
+
_SWISS_CRITICLALITY_PREDICTION_CITATION_FACTS = {
|
187 |
+
**_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS,
|
188 |
+
"input_col": "facts",
|
189 |
+
"label_col": "citation_label",
|
190 |
+
"label_classes": ["critical-1", "critical-2", "critical-3", "critical-4", "non-critical"],
|
191 |
+
}
|
192 |
+
_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS = {
|
193 |
+
**_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS,
|
194 |
+
"input_col": "considerations",
|
195 |
+
"label_col": "citation_label",
|
196 |
+
"label_classes": ["critical-1", "critical-2", "critical-3", "critical-4", "non-critical"],
|
197 |
+
}
|
198 |
+
|
199 |
_GERMAN_ARGUMENT_MINING = {
|
200 |
"task_type": TaskType.SLTC,
|
201 |
"hf_hub_name": "joelito/german_argument_mining",
|
|
|
4088 |
LextremeConfig(name="greek_legal_code_subject", **_GREEK_LEGAL_CODE_SUBJECT),
|
4089 |
LextremeConfig(name="online_terms_of_service_unfairness_levels", **_ONLINE_TERMS_OF_SERVICE_UNFAIRNESS_LEVELS),
|
4090 |
LextremeConfig(name="turkish_constitutional_court_decisions_judgment", **_TURKISH_CONSTITUTIONAL_COURT_DECISIONS_JUDGMENT),
|
4091 |
+
LextremeConfig(name="swiss_criticality_prediction_bge_facts", **_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS),
|
4092 |
+
LextremeConfig(name="swiss_criticality_prediction_bge_considerations", **_SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS),
|
4093 |
+
LextremeConfig(name="swiss_criticality_prediction_citation_facts", **_SWISS_CRITICLALITY_PREDICTION_CITATION_FACTS),
|
4094 |
+
LextremeConfig(name="swiss_criticality_prediction_citation_considerations", **_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS),
|
4095 |
+
|
4096 |
# MLTC tasks
|
4097 |
LextremeConfig(name="online_terms_of_service_clause_topics", **_ONLINE_TERMS_OF_SERVICE_CLAUSE_TOPICS),
|
4098 |
LextremeConfig(name="covid19_emergency_event", **_COVID19_EMERGENCY_EVENT),
|