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