vr18 commited on
Commit
e05af48
1 Parent(s): 917c6f8

Adjust for law sub area

Browse files
Files changed (1) hide show
  1. lextreme.py +8 -39
lextreme.py CHANGED
@@ -223,7 +223,7 @@ _SWISS_LAW_AREA_PREDICTION_FACTS = {
223
  "hf_hub_name": "rcds/swiss_law_area_prediction",
224
  "url": "https://huggingface.co/datasets/rcds/swiss_law_area_prediction",
225
  "input_col": "facts",
226
- "label_col": "label",
227
  "config_name": "main",
228
  "description":
229
  """
@@ -239,42 +239,15 @@ _SWISS_LAW_AREA_PREDICTION_CONSIDERATIONS = {
239
  "input_col": "considerations",
240
  }
241
 
242
- _SWISS_LAW_AREA_PREDICTION_CIVIL_FACTS = {
243
  **_SWISS_LAW_AREA_PREDICTION_FACTS,
244
- "config_name": "civil",
245
- "label_col": "label",
246
- "label_classes": ['Rental and Lease', 'Employment Contract', 'Bankruptcy', 'Family', 'Competition and Antitrust', 'Intellectual Property']
247
- }
248
-
249
- _SWISS_LAW_AREA_PREDICTION_CRIMINAL_FACTS = {
250
- **_SWISS_LAW_AREA_PREDICTION_CIVIL_FACTS,
251
- "config_name": "criminal",
252
- "label_classes": ['Substantive Criminal', 'Criminal Procedure']
253
- }
254
-
255
- _SWISS_LAW_AREA_PREDICTION_PUBLIC_FACTS = {
256
- **_SWISS_LAW_AREA_PREDICTION_CIVIL_FACTS,
257
- "config_name": "public",
258
- "label_classes": ['Tax', 'Urban Planning and Environmental', 'Expropriation', 'Public Administration', 'Other Fiscal']
259
- }
260
-
261
- _SWISS_LAW_AREA_PREDICTION_CIVIL_CONSIDERATIONS = {
262
- **_SWISS_LAW_AREA_PREDICTION_CIVIL_FACTS,
263
- "input_col": "considerations",
264
- }
265
-
266
- _SWISS_LAW_AREA_PREDICTION_CRIMINAL_CONSIDERATIONS = {
267
- **_SWISS_LAW_AREA_PREDICTION_CIVIL_FACTS,
268
- "config_name": "criminal",
269
- "input_col": "considerations",
270
- "label_classes": ['Substantive Criminal', 'Criminal Procedure']
271
  }
272
 
273
- _SWISS_LAW_AREA_PREDICTION_PUBLIC_CONSIDERATIONS = {
274
- **_SWISS_LAW_AREA_PREDICTION_CIVIL_FACTS,
275
- "config_name": "public",
276
  "input_col": "considerations",
277
- "label_classes": ['Tax', 'Urban Planning and Environmental', 'Expropriation', 'Public Administration', 'Other Fiscal']
278
  }
279
 
280
  _GERMAN_ARGUMENT_MINING = {
@@ -4175,12 +4148,8 @@ class LEXTREME(datasets.GeneratorBasedBuilder):
4175
  LextremeConfig(name="swiss_criticality_prediction_citation_considerations", **_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS),
4176
  LextremeConfig(name="swiss_law_area_prediction_facts", **_SWISS_LAW_AREA_PREDICTION_FACTS),
4177
  LextremeConfig(name="swiss_law_area_prediction_considerations", **_SWISS_LAW_AREA_PREDICTION_CONSIDERATIONS),
4178
- LextremeConfig(name="swiss_law_area_prediction_civil_facts", **_SWISS_LAW_AREA_PREDICTION_CIVIL_FACTS),
4179
- LextremeConfig(name="swiss_law_area_prediction_civil_considerations", **_SWISS_LAW_AREA_PREDICTION_CIVIL_CONSIDERATIONS),
4180
- LextremeConfig(name="swiss_law_area_prediction_criminal_facts", **_SWISS_LAW_AREA_PREDICTION_CRIMINAL_FACTS),
4181
- LextremeConfig(name="swiss_law_area_prediction_criminal_considerations", **_SWISS_LAW_AREA_PREDICTION_CRIMINAL_CONSIDERATIONS),
4182
- LextremeConfig(name="swiss_law_area_prediction_public_facts", **_SWISS_LAW_AREA_PREDICTION_PUBLIC_FACTS),
4183
- LextremeConfig(name="swiss_law_area_prediction_public_considerations", **_SWISS_LAW_AREA_PREDICTION_PUBLIC_CONSIDERATIONS),
4184
  LextremeConfig(name="swiss_judgment_prediction_xl_facts", **_SWISS_JUDGMENT_PREDICTION_XL_FACTS),
4185
  LextremeConfig(name="swiss_judgment_prediction_xl_considerations", **_SWISS_JUDGMENT_PREDICTION_XL_CONSIDERATIONS),
4186
 
 
223
  "hf_hub_name": "rcds/swiss_law_area_prediction",
224
  "url": "https://huggingface.co/datasets/rcds/swiss_law_area_prediction",
225
  "input_col": "facts",
226
+ "label_col": "law_area",
227
  "config_name": "main",
228
  "description":
229
  """
 
239
  "input_col": "considerations",
240
  }
241
 
242
+ _SWISS_LAW_AREA_PREDICTION_SUB_AREA_FACTS = {
243
  **_SWISS_LAW_AREA_PREDICTION_FACTS,
244
+ "label_col": "law_sub_area",
245
+ "label_classes": ['Rental and Lease', 'Employment Contract', 'Bankruptcy', 'Family', 'Competition and Antitrust', 'Intellectual Property', 'Substantive Criminal', 'Criminal Procedure', 'Tax', 'Urban Planning and Environmental', 'Expropriation', 'Public Administration', 'Other Fiscal']
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
246
  }
247
 
248
+ _SWISS_LAW_AREA_PREDICTION_SUB_AREA_CONSIDERATIONS = {
249
+ **_SWISS_LAW_AREA_PREDICTION_SUB_AREA_FACTS,
 
250
  "input_col": "considerations",
 
251
  }
252
 
253
  _GERMAN_ARGUMENT_MINING = {
 
4148
  LextremeConfig(name="swiss_criticality_prediction_citation_considerations", **_SWISS_CRITICLALITY_PREDICTION_CITATION_CONSIDERATIONS),
4149
  LextremeConfig(name="swiss_law_area_prediction_facts", **_SWISS_LAW_AREA_PREDICTION_FACTS),
4150
  LextremeConfig(name="swiss_law_area_prediction_considerations", **_SWISS_LAW_AREA_PREDICTION_CONSIDERATIONS),
4151
+ LextremeConfig(name="swiss_law_area_prediction_sub_area_facts", **_SWISS_LAW_AREA_PREDICTION_SUB_AREA_FACTS),
4152
+ LextremeConfig(name="swiss_law_area_prediction_sub_area_considerations", **_SWISS_LAW_AREA_PREDICTION_SUB_AREA_CONSIDERATIONS),
 
 
 
 
4153
  LextremeConfig(name="swiss_judgment_prediction_xl_facts", **_SWISS_JUDGMENT_PREDICTION_XL_FACTS),
4154
  LextremeConfig(name="swiss_judgment_prediction_xl_considerations", **_SWISS_JUDGMENT_PREDICTION_XL_CONSIDERATIONS),
4155