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