Update lextreme.py
#9
by
Stern5497
- opened
- lextreme.py +85 -0
lextreme.py
CHANGED
|
@@ -162,6 +162,81 @@ _SWISS_JUDGMENT_PREDICTION = {
|
|
| 162 |
"label_classes": ["dismissal", "approval"],
|
| 163 |
}
|
| 164 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 165 |
_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS = {
|
| 166 |
"task_type": TaskType.SLTC,
|
| 167 |
"hf_hub_name": "rcds/legal_criticality_prediction",
|
|
@@ -4093,6 +4168,16 @@ class LEXTREME(datasets.GeneratorBasedBuilder):
|
|
| 4093 |
LextremeConfig(name="swiss_criticality_prediction_bge_considerations", **_SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS),
|
| 4094 |
LextremeConfig(name="swiss_criticality_prediction_citation_facts", **_SWISS_CRITICLALITY_PREDICTION_CITATION_FACTS),
|
| 4095 |
LextremeConfig(name="swiss_criticality_prediction_citation_considerations", **_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4096 |
|
| 4097 |
# MLTC tasks
|
| 4098 |
LextremeConfig(name="online_terms_of_service_clause_topics", **_ONLINE_TERMS_OF_SERVICE_CLAUSE_TOPICS),
|
|
|
|
| 162 |
"label_classes": ["dismissal", "approval"],
|
| 163 |
}
|
| 164 |
|
| 165 |
+
_SWISS_JUDGMENT_PREDICTION_XL_FACTS = {
|
| 166 |
+
"task_type": TaskType.SLTC,
|
| 167 |
+
"hf_hub_name": "rcds/judgment_prediction",
|
| 168 |
+
"config_name": "all",
|
| 169 |
+
"input_col": "facts",
|
| 170 |
+
"label_col": "label",
|
| 171 |
+
"url": "https://huggingface.co/datasets/rcds/judgment_prediction",
|
| 172 |
+
"description":
|
| 173 |
+
"""
|
| 174 |
+
Swiss-Judgment-Prediction is a multilingual, diachronic dataset Swiss Court cases annotated with the respective binarized judgment outcome (approval/dismissal), posing a challenging text classification task.
|
| 175 |
+
"""
|
| 176 |
+
,
|
| 177 |
+
# TODO add citation
|
| 178 |
+
"label_classes": ["dismissal", "approval"],
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
_SWISS_JUDGMENT_PREDICTION_XL_CONSIDERATIONS = {
|
| 182 |
+
**_SWISS_JUDGMENT_PREDICTION_XL_FACTS,
|
| 183 |
+
"input_col": "considerations",
|
| 184 |
+
}
|
| 185 |
+
|
| 186 |
+
_SWISS_LEGAL_AREA_PREDICTION_FACTS = {
|
| 187 |
+
"task_type": TaskType.SLTC,
|
| 188 |
+
"hf_hub_name": "rcds/law_area_prediction",
|
| 189 |
+
"url": "https://huggingface.co/datasets/rcds/law_area_prediction",
|
| 190 |
+
"input_col": "facts",
|
| 191 |
+
"label_col": "label",
|
| 192 |
+
"config_name": "main",
|
| 193 |
+
"description":
|
| 194 |
+
"""
|
| 195 |
+
Law Area Prediction is a multilingual, diachronic dataset of Swiss Court (FSCS) cases annotated with a law area.
|
| 196 |
+
"""
|
| 197 |
+
,
|
| 198 |
+
# TODO add citation
|
| 199 |
+
"label_classes": ["civil", "public", "criminal"],
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
_SWISS_LEGAL_AREA_PREDICTION_CONSIDERATIONS = {
|
| 203 |
+
**_SWISS_LEGAL_AREA_PREDICTION_FACTS,
|
| 204 |
+
"input_col": "considerations",
|
| 205 |
+
}
|
| 206 |
+
|
| 207 |
+
_SWISS_LEGAL_AREA_PREDICTION_CIVIL_FACTS = {
|
| 208 |
+
**_SWISS_LEGAL_AREA_PREDICTION_FACTS,
|
| 209 |
+
"label_col": "law_area",
|
| 210 |
+
"label_classes": ['Rental and Lease', 'Employment Contract', 'Bankruptcy', 'Family', 'Competition and Antitrust', 'Intellectual Property']
|
| 211 |
+
}
|
| 212 |
+
|
| 213 |
+
_SWISS_LEGAL_AREA_PREDICTION_CRIMINAL_FACTS = {
|
| 214 |
+
**_SWISS_LEGAL_AREA_PREDICTION_CIVIL_FACTS,
|
| 215 |
+
"label_classes": ['Substantive Criminal', 'Criminal Procedure']
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
_SWISS_LEGAL_AREA_PREDICTION_PUBLIC_FACTS = {
|
| 219 |
+
**_SWISS_LEGAL_AREA_PREDICTION_CIVIL_FACTS,
|
| 220 |
+
"label_classes": ['Tax', 'Urban Planning and Environmental', 'Expropriation', 'Public Administration', 'Other Fiscal']
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
_SWISS_LEGAL_AREA_PREDICTION_CIVIL_CONSIDERATIONS = {
|
| 224 |
+
**_SWISS_LEGAL_AREA_PREDICTION_CIVIL_FACTS,
|
| 225 |
+
"label_classes": ['Rental and Lease', 'Employment Contract', 'Bankruptcy', 'Family', 'Competition and Antitrust', 'Intellectual Property']
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
_SWISS_LEGAL_AREA_PREDICTION_CRIMINAL_CONSIDERATIONS = {
|
| 229 |
+
**_SWISS_LEGAL_AREA_PREDICTION_CIVIL_FACTS,
|
| 230 |
+
"input_col": "considerations",
|
| 231 |
+
"label_classes": ['Substantive Criminal', 'Criminal Procedure']
|
| 232 |
+
}
|
| 233 |
+
|
| 234 |
+
_SWISS_LEGAL_AREA_PREDICTION_PUBLIC_CONSIDERATIONS = {
|
| 235 |
+
**_SWISS_LEGAL_AREA_PREDICTION_CIVIL_FACTS,
|
| 236 |
+
"input_col": "considerations",
|
| 237 |
+
"label_classes": ['Tax', 'Urban Planning and Environmental', 'Expropriation', 'Public Administration', 'Other Fiscal']
|
| 238 |
+
}
|
| 239 |
+
|
| 240 |
_SWISS_CRITICLALITY_PREDICTION_BGE_FACTS = {
|
| 241 |
"task_type": TaskType.SLTC,
|
| 242 |
"hf_hub_name": "rcds/legal_criticality_prediction",
|
|
|
|
| 4168 |
LextremeConfig(name="swiss_criticality_prediction_bge_considerations", **_SWISS_CRITICLALITY_PREDICTION_BGE_CONSIDERATIONS),
|
| 4169 |
LextremeConfig(name="swiss_criticality_prediction_citation_facts", **_SWISS_CRITICLALITY_PREDICTION_CITATION_FACTS),
|
| 4170 |
LextremeConfig(name="swiss_criticality_prediction_citation_considerations", **_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS),
|
| 4171 |
+
LextremeConfig(name="swiss_legal_area_prediction_facts", **_SWISS_LEGAL_AREA_PREDICTION_FACTS),
|
| 4172 |
+
LextremeConfig(name="swiss_legal_area_prediction_considerations", **_SWISS_LEGAL_AREA_PREDICTION_CONSIDERATIONS),
|
| 4173 |
+
LextremeConfig(name="swiss_legal_area_prediction_civil_facts", **_SWISS_LEGAL_AREA_PREDICTION_CIVIL_FACTS),
|
| 4174 |
+
LextremeConfig(name="swiss_legal_area_prediction_civil_considerations", **_SWISS_LEGAL_AREA_PREDICTION_CIVIL_CONSIDERATIONS),
|
| 4175 |
+
LextremeConfig(name="swiss_legal_area_prediction_criminal_facts", **_SWISS_LEGAL_AREA_PREDICTION_CRIMINAL_FACTS),
|
| 4176 |
+
LextremeConfig(name="swiss_legal_area_prediction_criminal_considerations", **_SWISS_LEGAL_AREA_PREDICTION_CRIMINAL_CONSIDERATIONS),
|
| 4177 |
+
LextremeConfig(name="swiss_legal_area_prediction_public_facts", **_SWISS_LEGAL_AREA_PREDICTION_PUBLIC_FACTS),
|
| 4178 |
+
LextremeConfig(name="swiss_legal_area_prediction_public_considerations", **_SWISS_LEGAL_AREA_PREDICTION_PUBLIC_CONSIDERATIONS),
|
| 4179 |
+
LextremeConfig(name="swiss_judgment_prediction_xl_facts", **_SWISS_JUDGMENT_PREDICTION_XL_FACTS),
|
| 4180 |
+
LextremeConfig(name="swiss_judgment_prediction_xl_considerations", **_SWISS_JUDGMENT_PREDICTION_XL_CONSIDERATIONS),
|
| 4181 |
|
| 4182 |
# MLTC tasks
|
| 4183 |
LextremeConfig(name="online_terms_of_service_clause_topics", **_ONLINE_TERMS_OF_SERVICE_CLAUSE_TOPICS),
|