Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:

Convert dataset to Parquet

#5
by albertvillanova HF staff - opened
README.md CHANGED
@@ -22,7 +22,42 @@ task_ids:
22
  - multiple-choice-qa
23
  - topic-classification
24
  pretty_name: LexGLUE
 
 
 
 
 
 
 
 
25
  dataset_info:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
  - config_name: ecthr_a
27
  features:
28
  - name: text
@@ -43,16 +78,16 @@ dataset_info:
43
  '9': P1-1
44
  splits:
45
  - name: train
46
- num_bytes: 89637461
47
  num_examples: 9000
48
  - name: test
49
- num_bytes: 11884180
50
  num_examples: 1000
51
  - name: validation
52
- num_bytes: 10985180
53
  num_examples: 1000
54
- download_size: 32852475
55
- dataset_size: 112506821
56
  - config_name: ecthr_b
57
  features:
58
  - name: text
@@ -73,16 +108,16 @@ dataset_info:
73
  '9': P1-1
74
  splits:
75
  - name: train
76
- num_bytes: 89657661
77
  num_examples: 9000
78
  - name: test
79
- num_bytes: 11886940
80
  num_examples: 1000
81
  - name: validation
82
- num_bytes: 10987828
83
  num_examples: 1000
84
- download_size: 32852475
85
- dataset_size: 112532429
86
  - config_name: eurlex
87
  features:
88
  - name: text
@@ -193,49 +228,16 @@ dataset_info:
193
  '99': '100285'
194
  splits:
195
  - name: train
196
- num_bytes: 390770289
197
  num_examples: 55000
198
  - name: test
199
- num_bytes: 59739102
200
  num_examples: 5000
201
  - name: validation
202
- num_bytes: 41544484
203
  num_examples: 5000
204
- download_size: 125413277
205
- dataset_size: 492053875
206
- - config_name: scotus
207
- features:
208
- - name: text
209
- dtype: string
210
- - name: label
211
- dtype:
212
- class_label:
213
- names:
214
- '0': '1'
215
- '1': '2'
216
- '2': '3'
217
- '3': '4'
218
- '4': '5'
219
- '5': '6'
220
- '6': '7'
221
- '7': '8'
222
- '8': '9'
223
- '9': '10'
224
- '10': '11'
225
- '11': '12'
226
- '12': '13'
227
- splits:
228
- - name: train
229
- num_bytes: 178959320
230
- num_examples: 5000
231
- - name: test
232
- num_bytes: 76213283
233
- num_examples: 1400
234
- - name: validation
235
- num_bytes: 75600247
236
- num_examples: 1400
237
- download_size: 104763335
238
- dataset_size: 330772850
239
  - config_name: ledgar
240
  features:
241
  - name: text
@@ -346,16 +348,49 @@ dataset_info:
346
  '99': Withholdings
347
  splits:
348
  - name: train
349
- num_bytes: 43358315
350
  num_examples: 60000
351
  - name: test
352
- num_bytes: 6845585
353
  num_examples: 10000
354
  - name: validation
355
- num_bytes: 7143592
356
  num_examples: 10000
357
- download_size: 16255623
358
- dataset_size: 57347492
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
359
  - config_name: unfair_tos
360
  features:
361
  - name: text
@@ -374,51 +409,73 @@ dataset_info:
374
  '7': Arbitration
375
  splits:
376
  - name: train
377
- num_bytes: 1041790
378
  num_examples: 5532
379
  - name: test
380
- num_bytes: 303107
381
  num_examples: 1607
382
  - name: validation
383
- num_bytes: 452119
384
  num_examples: 2275
385
- download_size: 511342
386
- dataset_size: 1797016
 
387
  - config_name: case_hold
388
- features:
389
- - name: context
390
- dtype: string
391
- - name: endings
392
- sequence: string
393
- - name: label
394
- dtype:
395
- class_label:
396
- names:
397
- '0': '0'
398
- '1': '1'
399
- '2': '2'
400
- '3': '3'
401
- '4': '4'
402
- splits:
403
- - name: train
404
- num_bytes: 74781766
405
- num_examples: 45000
406
- - name: test
407
- num_bytes: 5989964
408
- num_examples: 3600
409
- - name: validation
410
- num_bytes: 6474615
411
- num_examples: 3900
412
- download_size: 30422703
413
- dataset_size: 87246345
414
- config_names:
415
- - case_hold
416
- - ecthr_a
417
- - ecthr_b
418
- - eurlex
419
- - ledgar
420
- - scotus
421
- - unfair_tos
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
422
  ---
423
 
424
  # Dataset Card for "LexGLUE"
 
22
  - multiple-choice-qa
23
  - topic-classification
24
  pretty_name: LexGLUE
25
+ config_names:
26
+ - case_hold
27
+ - ecthr_a
28
+ - ecthr_b
29
+ - eurlex
30
+ - ledgar
31
+ - scotus
32
+ - unfair_tos
33
  dataset_info:
34
+ - config_name: case_hold
35
+ features:
36
+ - name: context
37
+ dtype: string
38
+ - name: endings
39
+ sequence: string
40
+ - name: label
41
+ dtype:
42
+ class_label:
43
+ names:
44
+ '0': '0'
45
+ '1': '1'
46
+ '2': '2'
47
+ '3': '3'
48
+ '4': '4'
49
+ splits:
50
+ - name: train
51
+ num_bytes: 74781706
52
+ num_examples: 45000
53
+ - name: test
54
+ num_bytes: 5989952
55
+ num_examples: 3600
56
+ - name: validation
57
+ num_bytes: 6474603
58
+ num_examples: 3900
59
+ download_size: 47303537
60
+ dataset_size: 87246261
61
  - config_name: ecthr_a
62
  features:
63
  - name: text
 
78
  '9': P1-1
79
  splits:
80
  - name: train
81
+ num_bytes: 89637449
82
  num_examples: 9000
83
  - name: test
84
+ num_bytes: 11884168
85
  num_examples: 1000
86
  - name: validation
87
+ num_bytes: 10985168
88
  num_examples: 1000
89
+ download_size: 53352586
90
+ dataset_size: 112506785
91
  - config_name: ecthr_b
92
  features:
93
  - name: text
 
108
  '9': P1-1
109
  splits:
110
  - name: train
111
+ num_bytes: 89657649
112
  num_examples: 9000
113
  - name: test
114
+ num_bytes: 11886928
115
  num_examples: 1000
116
  - name: validation
117
+ num_bytes: 10987816
118
  num_examples: 1000
119
+ download_size: 53352494
120
+ dataset_size: 112532393
121
  - config_name: eurlex
122
  features:
123
  - name: text
 
228
  '99': '100285'
229
  splits:
230
  - name: train
231
+ num_bytes: 390770241
232
  num_examples: 55000
233
  - name: test
234
+ num_bytes: 59739094
235
  num_examples: 5000
236
  - name: validation
237
+ num_bytes: 41544476
238
  num_examples: 5000
239
+ download_size: 208028049
240
+ dataset_size: 492053811
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
241
  - config_name: ledgar
242
  features:
243
  - name: text
 
348
  '99': Withholdings
349
  splits:
350
  - name: train
351
+ num_bytes: 43358291
352
  num_examples: 60000
353
  - name: test
354
+ num_bytes: 6845581
355
  num_examples: 10000
356
  - name: validation
357
+ num_bytes: 7143588
358
  num_examples: 10000
359
+ download_size: 27650585
360
+ dataset_size: 57347460
361
+ - config_name: scotus
362
+ features:
363
+ - name: text
364
+ dtype: string
365
+ - name: label
366
+ dtype:
367
+ class_label:
368
+ names:
369
+ '0': '1'
370
+ '1': '2'
371
+ '2': '3'
372
+ '3': '4'
373
+ '4': '5'
374
+ '5': '6'
375
+ '6': '7'
376
+ '7': '8'
377
+ '8': '9'
378
+ '9': '10'
379
+ '10': '11'
380
+ '11': '12'
381
+ '12': '13'
382
+ splits:
383
+ - name: train
384
+ num_bytes: 178959316
385
+ num_examples: 5000
386
+ - name: test
387
+ num_bytes: 76213279
388
+ num_examples: 1400
389
+ - name: validation
390
+ num_bytes: 75600243
391
+ num_examples: 1400
392
+ download_size: 173411399
393
+ dataset_size: 330772838
394
  - config_name: unfair_tos
395
  features:
396
  - name: text
 
409
  '7': Arbitration
410
  splits:
411
  - name: train
412
+ num_bytes: 1041782
413
  num_examples: 5532
414
  - name: test
415
+ num_bytes: 303099
416
  num_examples: 1607
417
  - name: validation
418
+ num_bytes: 452111
419
  num_examples: 2275
420
+ download_size: 865604
421
+ dataset_size: 1796992
422
+ configs:
423
  - config_name: case_hold
424
+ data_files:
425
+ - split: train
426
+ path: case_hold/train-*
427
+ - split: test
428
+ path: case_hold/test-*
429
+ - split: validation
430
+ path: case_hold/validation-*
431
+ - config_name: ecthr_a
432
+ data_files:
433
+ - split: train
434
+ path: ecthr_a/train-*
435
+ - split: test
436
+ path: ecthr_a/test-*
437
+ - split: validation
438
+ path: ecthr_a/validation-*
439
+ - config_name: ecthr_b
440
+ data_files:
441
+ - split: train
442
+ path: ecthr_b/train-*
443
+ - split: test
444
+ path: ecthr_b/test-*
445
+ - split: validation
446
+ path: ecthr_b/validation-*
447
+ - config_name: eurlex
448
+ data_files:
449
+ - split: train
450
+ path: eurlex/train-*
451
+ - split: test
452
+ path: eurlex/test-*
453
+ - split: validation
454
+ path: eurlex/validation-*
455
+ - config_name: ledgar
456
+ data_files:
457
+ - split: train
458
+ path: ledgar/train-*
459
+ - split: test
460
+ path: ledgar/test-*
461
+ - split: validation
462
+ path: ledgar/validation-*
463
+ - config_name: scotus
464
+ data_files:
465
+ - split: train
466
+ path: scotus/train-*
467
+ - split: test
468
+ path: scotus/test-*
469
+ - split: validation
470
+ path: scotus/validation-*
471
+ - config_name: unfair_tos
472
+ data_files:
473
+ - split: train
474
+ path: unfair_tos/train-*
475
+ - split: test
476
+ path: unfair_tos/test-*
477
+ - split: validation
478
+ path: unfair_tos/validation-*
479
  ---
480
 
481
  # Dataset Card for "LexGLUE"
case_hold/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0028b12e681c1ddd4370a53d6670334a4cf2c8b3179f1d5c2c9c10a95a1afe37
3
+ size 3256651
case_hold/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b0c4a7c5f5228d412a09411b6feac17cff791d072efb72d567dd5460ec7a5925
3
+ size 40533452
case_hold/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:94d17463cae99ffc9f86bb1faa033bab7b71e08f32cd83550ce96d4d71f2638d
3
+ size 3513434
dataset_infos.json DELETED
@@ -1 +0,0 @@
1
- {"ecthr_a": {"description": "The European Court of Human Rights (ECtHR) hears allegations that a state has\nbreached human rights provisions of the European Convention of Human Rights (ECHR).\nFor each case, the dataset provides a list of factual paragraphs (facts) from the case description.\nEach case is mapped to articles of the ECHR that were violated (if any).", "citation": "@inproceedings{chalkidis-etal-2021-paragraph,\n title = \"Paragraph-level Rationale Extraction through Regularization: A case study on {E}uropean Court of Human Rights Cases\",\n author = \"Chalkidis, Ilias and\n Fergadiotis, Manos and\n Tsarapatsanis, Dimitrios and\n Aletras, Nikolaos and\n Androutsopoulos, Ion and\n Malakasiotis, Prodromos\",\n booktitle = \"Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies\",\n month = jun,\n year = \"2021\",\n address = \"Online\",\n publisher = \"Association for Computational Linguistics\",\n url = \"https://aclanthology.org/2021.naacl-main.22\",\n doi = \"10.18653/v1/2021.naacl-main.22\",\n pages = \"226--241\",\n}\n}\n@article{chalkidis-etal-2021-lexglue,\n title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},\n author={Chalkidis, Ilias and\n Jana, Abhik and\n Hartung, Dirk and\n Bommarito, Michael and\n Androutsopoulos, Ion and\n Katz, Daniel Martin and\n Aletras, Nikolaos},\n year={2021},\n eprint={2110.00976},\n archivePrefix={arXiv},\n primaryClass={cs.CL},\n note = {arXiv: 2110.00976},\n}", "homepage": "https://archive.org/details/ECtHR-NAACL2021", "license": "", "features": {"text": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "labels": {"feature": {"num_classes": 10, "names": ["2", "3", "5", "6", "8", "9", "10", "11", "14", "P1-1"], "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "lex_glue", "config_name": "ecthr_a", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 89637461, "num_examples": 9000, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 11884180, "num_examples": 1000, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 10985180, "num_examples": 1000, "dataset_name": "lex_glue"}}, "download_checksums": {"https://zenodo.org/record/5532997/files/ecthr.tar.gz": {"num_bytes": 32852475, "checksum": "461c1f6016af3a7ac0bd115c1f9ff65031258bfec39e570fec74a16d8946398e"}}, "download_size": 32852475, "post_processing_size": null, "dataset_size": 112506821, "size_in_bytes": 145359296}, "ecthr_b": {"description": "The European Court of Human Rights (ECtHR) hears allegations that a state has\nbreached human rights provisions of the European Convention of Human Rights (ECHR).\nFor each case, the dataset provides a list of factual paragraphs (facts) from the case description.\nEach case is mapped to articles of ECHR that were allegedly violated (considered by the court).", "citation": "@inproceedings{chalkidis-etal-2021-paragraph,\n title = \"Paragraph-level Rationale Extraction through Regularization: A case study on {E}uropean Court of Human Rights Cases\",\n author = \"Chalkidis, Ilias\n and Fergadiotis, Manos\n and Tsarapatsanis, Dimitrios\n and Aletras, Nikolaos\n and Androutsopoulos, Ion\n and Malakasiotis, Prodromos\",\n booktitle = \"Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies\",\n year = \"2021\",\n address = \"Online\",\n url = \"https://aclanthology.org/2021.naacl-main.22\",\n}\n}\n@article{chalkidis-etal-2021-lexglue,\n title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},\n author={Chalkidis, Ilias and\n Jana, Abhik and\n Hartung, Dirk and\n Bommarito, Michael and\n Androutsopoulos, Ion and\n Katz, Daniel Martin and\n Aletras, Nikolaos},\n year={2021},\n eprint={2110.00976},\n archivePrefix={arXiv},\n primaryClass={cs.CL},\n note = {arXiv: 2110.00976},\n}", "homepage": "https://archive.org/details/ECtHR-NAACL2021", "license": "", "features": {"text": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "labels": {"feature": {"num_classes": 10, "names": ["2", "3", "5", "6", "8", "9", "10", "11", "14", "P1-1"], "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "lex_glue", "config_name": "ecthr_b", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 89657661, "num_examples": 9000, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 11886940, "num_examples": 1000, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 10987828, "num_examples": 1000, "dataset_name": "lex_glue"}}, "download_checksums": {"https://zenodo.org/record/5532997/files/ecthr.tar.gz": {"num_bytes": 32852475, "checksum": "461c1f6016af3a7ac0bd115c1f9ff65031258bfec39e570fec74a16d8946398e"}}, "download_size": 32852475, "post_processing_size": null, "dataset_size": 112532429, "size_in_bytes": 145384904}, "eurlex": {"description": "European Union (EU) legislation is published in EUR-Lex portal.\nAll EU laws are annotated by EU's Publications Office with multiple concepts from the EuroVoc thesaurus,\na multilingual thesaurus maintained by the Publications Office.\nThe current version of EuroVoc contains more than 7k concepts referring to various activities\nof the EU and its Member States (e.g., economics, health-care, trade).\nGiven a document, the task is to predict its EuroVoc labels (concepts).", "citation": "@inproceedings{chalkidis-etal-2021-multieurlex,\n author = {Chalkidis, Ilias and\n Fergadiotis, Manos and\n Androutsopoulos, Ion},\n title = {MultiEURLEX -- A multi-lingual and multi-label legal document\n classification dataset for zero-shot cross-lingual transfer},\n booktitle = {Proceedings of the 2021 Conference on Empirical Methods\n in Natural Language Processing},\n year = {2021},\n location = {Punta Cana, Dominican Republic},\n}\n}\n@article{chalkidis-etal-2021-lexglue,\n title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},\n author={Chalkidis, Ilias and\n Jana, Abhik and\n Hartung, Dirk and\n Bommarito, Michael and\n Androutsopoulos, Ion and\n Katz, Daniel Martin and\n Aletras, Nikolaos},\n year={2021},\n eprint={2110.00976},\n archivePrefix={arXiv},\n primaryClass={cs.CL},\n note = {arXiv: 2110.00976},\n}", "homepage": "https://zenodo.org/record/5363165#.YVJOAi8RqaA", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "labels": {"feature": {"num_classes": 100, "names": ["100163", "100168", "100169", "100170", "100171", "100172", "100173", "100174", "100175", "100176", "100177", "100179", "100180", "100183", "100184", "100185", "100186", "100187", "100189", "100190", "100191", "100192", "100193", "100194", "100195", "100196", "100197", "100198", "100199", "100200", "100201", "100202", "100204", "100205", "100206", "100207", "100212", "100214", "100215", "100220", "100221", "100222", "100223", "100224", "100226", "100227", "100229", "100230", "100231", "100232", "100233", "100234", "100235", "100237", "100238", "100239", "100240", "100241", "100242", "100243", "100244", "100245", "100246", "100247", "100248", "100249", "100250", "100252", "100253", "100254", "100255", "100256", "100257", "100258", "100259", "100260", "100261", "100262", "100263", "100264", "100265", "100266", "100268", "100269", "100270", "100271", "100272", "100273", "100274", "100275", "100276", "100277", "100278", "100279", "100280", "100281", "100282", "100283", "100284", "100285"], "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "lex_glue", "config_name": "eurlex", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 390770289, "num_examples": 55000, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 59739102, "num_examples": 5000, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 41544484, "num_examples": 5000, "dataset_name": "lex_glue"}}, "download_checksums": {"https://zenodo.org/record/5532997/files/eurlex.tar.gz": {"num_bytes": 125413277, "checksum": "82376ff55c3812632d8a21ad0d7e515e2e7ec6431ca7673a454cdd41a3a7bf46"}}, "download_size": 125413277, "post_processing_size": null, "dataset_size": 492053875, "size_in_bytes": 617467152}, "scotus": {"description": "The US Supreme Court (SCOTUS) is the highest federal court in the United States of America\nand generally hears only the most controversial or otherwise complex cases which have not\nbeen sufficiently well solved by lower courts. This is a single-label multi-class classification\ntask, where given a document (court opinion), the task is to predict the relevant issue areas.\nThe 14 issue areas cluster 278 issues whose focus is on the subject matter of the controversy (dispute).", "citation": "@misc{spaeth2020,\n author = {Harold J. Spaeth and Lee Epstein and Andrew D. Martin, Jeffrey A. Segal\n and Theodore J. Ruger and Sara C. Benesh},\n year = {2020},\n title ={{Supreme Court Database, Version 2020 Release 01}},\n url= {http://Supremecourtdatabase.org},\n howpublished={Washington University Law}\n}\n@article{chalkidis-etal-2021-lexglue,\n title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},\n author={Chalkidis, Ilias and\n Jana, Abhik and\n Hartung, Dirk and\n Bommarito, Michael and\n Androutsopoulos, Ion and\n Katz, Daniel Martin and\n Aletras, Nikolaos},\n year={2021},\n eprint={2110.00976},\n archivePrefix={arXiv},\n primaryClass={cs.CL},\n note = {arXiv: 2110.00976},\n}", "homepage": "http://scdb.wustl.edu/data.php", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 13, "names": ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "lex_glue", "config_name": "scotus", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 178959320, "num_examples": 5000, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 76213283, "num_examples": 1400, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 75600247, "num_examples": 1400, "dataset_name": "lex_glue"}}, "download_checksums": {"https://zenodo.org/record/5532997/files/scotus.tar.gz": {"num_bytes": 104763335, "checksum": "d53cc99aaf60b24ca7e4cf634f08a2572b5b3532f83aecdfc2c4257050dc9d0a"}}, "download_size": 104763335, "post_processing_size": null, "dataset_size": 330772850, "size_in_bytes": 435536185}, "ledgar": {"description": "LEDGAR dataset aims contract provision (paragraph) classification.\nThe contract provisions come from contracts obtained from the US Securities and Exchange Commission (SEC)\nfilings, which are publicly available from EDGAR. Each label represents the single main topic\n(theme) of the corresponding contract provision.", "citation": "@inproceedings{tuggener-etal-2020-ledgar,\n title = \"{LEDGAR}: A Large-Scale Multi-label Corpus for Text Classification of Legal Provisions in Contracts\",\n author = {Tuggener, Don and\n von D{\"a}niken, Pius and\n Peetz, Thomas and\n Cieliebak, Mark},\n booktitle = \"Proceedings of the 12th Language Resources and Evaluation Conference\",\n year = \"2020\",\n address = \"Marseille, France\",\n url = \"https://aclanthology.org/2020.lrec-1.155\",\n}\n}\n@article{chalkidis-etal-2021-lexglue,\n title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},\n author={Chalkidis, Ilias and\n Jana, Abhik and\n Hartung, Dirk and\n Bommarito, Michael and\n Androutsopoulos, Ion and\n Katz, Daniel Martin and\n Aletras, Nikolaos},\n year={2021},\n eprint={2110.00976},\n archivePrefix={arXiv},\n primaryClass={cs.CL},\n note = {arXiv: 2110.00976},\n}", "homepage": "https://metatext.io/datasets/ledgar", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "label": {"num_classes": 100, "names": ["Adjustments", "Agreements", "Amendments", "Anti-Corruption Laws", "Applicable Laws", "Approvals", "Arbitration", "Assignments", "Assigns", "Authority", "Authorizations", "Base Salary", "Benefits", "Binding Effects", "Books", "Brokers", "Capitalization", "Change In Control", "Closings", "Compliance With Laws", "Confidentiality", "Consent To Jurisdiction", "Consents", "Construction", "Cooperation", "Costs", "Counterparts", "Death", "Defined Terms", "Definitions", "Disability", "Disclosures", "Duties", "Effective Dates", "Effectiveness", "Employment", "Enforceability", "Enforcements", "Entire Agreements", "Erisa", "Existence", "Expenses", "Fees", "Financial Statements", "Forfeitures", "Further Assurances", "General", "Governing Laws", "Headings", "Indemnifications", "Indemnity", "Insurances", "Integration", "Intellectual Property", "Interests", "Interpretations", "Jurisdictions", "Liens", "Litigations", "Miscellaneous", "Modifications", "No Conflicts", "No Defaults", "No Waivers", "Non-Disparagement", "Notices", "Organizations", "Participations", "Payments", "Positions", "Powers", "Publicity", "Qualifications", "Records", "Releases", "Remedies", "Representations", "Sales", "Sanctions", "Severability", "Solvency", "Specific Performance", "Submission To Jurisdiction", "Subsidiaries", "Successors", "Survival", "Tax Withholdings", "Taxes", "Terminations", "Terms", "Titles", "Transactions With Affiliates", "Use Of Proceeds", "Vacations", "Venues", "Vesting", "Waiver Of Jury Trials", "Waivers", "Warranties", "Withholdings"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "lex_glue", "config_name": "ledgar", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 43358315, "num_examples": 60000, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 6845585, "num_examples": 10000, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 7143592, "num_examples": 10000, "dataset_name": "lex_glue"}}, "download_checksums": {"https://zenodo.org/record/5532997/files/ledgar.tar.gz": {"num_bytes": 16255623, "checksum": "f7507bcce46ce03e3e91b8aaa1b84ddf6e8f1d628c0d7fa351f97ce45366d5d8"}}, "download_size": 16255623, "post_processing_size": null, "dataset_size": 57347492, "size_in_bytes": 73603115}, "unfair_tos": {"description": "The UNFAIR-ToS dataset contains 50 Terms of Service (ToS) from on-line platforms (e.g., YouTube,\nEbay, Facebook, etc.). The dataset has been annotated on the sentence-level with 8 types of\nunfair contractual terms (sentences), meaning terms that potentially violate user rights\naccording to the European consumer law.", "citation": "@article{lippi-etal-2019-claudette,\n title = \"{CLAUDETTE}: an automated detector of potentially unfair clauses in online terms of service\",\n author = {Lippi, Marco\n and Pa\u0142ka, Przemys\u0142aw\n and Contissa, Giuseppe\n and Lagioia, Francesca\n and Micklitz, Hans-Wolfgang\n and Sartor, Giovanni\n and Torroni, Paolo},\n journal = \"Artificial Intelligence and Law\",\n year = \"2019\",\n publisher = \"Springer\",\n url = \"https://doi.org/10.1007/s10506-019-09243-2\",\n pages = \"117--139\",\n}\n@article{chalkidis-etal-2021-lexglue,\n title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},\n author={Chalkidis, Ilias and\n Jana, Abhik and\n Hartung, Dirk and\n Bommarito, Michael and\n Androutsopoulos, Ion and\n Katz, Daniel Martin and\n Aletras, Nikolaos},\n year={2021},\n eprint={2110.00976},\n archivePrefix={arXiv},\n primaryClass={cs.CL},\n note = {arXiv: 2110.00976},\n}", "homepage": "http://claudette.eui.eu", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "labels": {"feature": {"num_classes": 8, "names": ["Limitation of liability", "Unilateral termination", "Unilateral change", "Content removal", "Contract by using", "Choice of law", "Jurisdiction", "Arbitration"], "id": null, "_type": "ClassLabel"}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "lex_glue", "config_name": "unfair_tos", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1041790, "num_examples": 5532, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 303107, "num_examples": 1607, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 452119, "num_examples": 2275, "dataset_name": "lex_glue"}}, "download_checksums": {"https://zenodo.org/record/5532997/files/unfair_tos.tar.gz": {"num_bytes": 511342, "checksum": "934470d74b62139dfbfad4a13b75a32e4a4d26a680ab12eedfb7659cdf669d53"}}, "download_size": 511342, "post_processing_size": null, "dataset_size": 1797016, "size_in_bytes": 2308358}, "case_hold": {"description": "The CaseHOLD (Case Holdings on Legal Decisions) dataset contains approx. 53k multiple choice\nquestions about holdings of US court cases from the Harvard Law Library case law corpus.\nHoldings are short summaries of legal rulings accompany referenced decisions relevant for the present case.\nThe input consists of an excerpt (or prompt) from a court decision, containing a reference\nto a particular case, while the holding statement is masked out. The model must identify\nthe correct (masked) holding statement from a selection of five choices.", "citation": "@inproceedings{Zheng2021,\n author = {Lucia Zheng and\n Neel Guha and\n Brandon R. Anderson and\n Peter Henderson and\n Daniel E. Ho},\n title = {When Does Pretraining Help? Assessing Self-Supervised Learning for\n Law and the CaseHOLD Dataset},\n year = {2021},\n booktitle = {International Conference on Artificial Intelligence and Law},\n}\n@article{chalkidis-etal-2021-lexglue,\n title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},\n author={Chalkidis, Ilias and\n Jana, Abhik and\n Hartung, Dirk and\n Bommarito, Michael and\n Androutsopoulos, Ion and\n Katz, Daniel Martin and\n Aletras, Nikolaos},\n year={2021},\n eprint={2110.00976},\n archivePrefix={arXiv},\n primaryClass={cs.CL},\n note = {arXiv: 2110.00976},\n}", "homepage": "https://github.com/reglab/casehold", "license": "", "features": {"context": {"dtype": "string", "id": null, "_type": "Value"}, "endings": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "label": {"num_classes": 5, "names": ["0", "1", "2", "3", "4"], "id": null, "_type": "ClassLabel"}}, "post_processed": null, "supervised_keys": null, "task_templates": null, "builder_name": "lex_glue", "config_name": "case_hold", "version": {"version_str": "1.0.0", "description": "", "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 74781766, "num_examples": 45000, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 5989964, "num_examples": 3600, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 6474615, "num_examples": 3900, "dataset_name": "lex_glue"}}, "download_checksums": {"https://zenodo.org/record/5532997/files/casehold.tar.gz": {"num_bytes": 30422703, "checksum": "728827dae0019880fe6be609e23f8c47fa2b49a2f0814a36687ace8db1c32d5e"}}, "download_size": 30422703, "post_processing_size": null, "dataset_size": 87246345, "size_in_bytes": 117669048}}
 
 
ecthr_a/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e306383d3ffd3baec21ba7419c03a9d2273f1c0946cf2d5512cf98c81d1a3f8b
3
+ size 5677114
ecthr_a/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2f263758eb80ec1c532e1c4bde6cbfb2a8ff41378ebec5999aca23929c39cdf4
3
+ size 42415324
ecthr_a/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d74de774cf566f7eea52563b54dec5721de6b7f5a34438c698aa48d7ff9de205
3
+ size 5260148
ecthr_b/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d41d3667819cce507b57f6a59da28fc3691a722b6cfb7f4bc74805f0e713df6e
3
+ size 5677091
ecthr_b/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:49ccf9e24ec08a05d5c69f2405e15e39c8472c6f786d03857abf914055befff6
3
+ size 42415290
ecthr_b/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fce01b0c0c5886b48ddd1f16f69ee1c3b7b2a9a5e96d2f3a601fe68c832b67d4
3
+ size 5260113
eurlex/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0c2ce5e5bc26c907607613aa1d7e4209553dbc3b85ec6ddcff1c745e2c7fdb9d
3
+ size 24273776
eurlex/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c0370abfe067fadec918490a01ba43ffc5bfdc6155283baffa5c120cf7754d3a
3
+ size 166694290
eurlex/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7f15ce05817231e33b5e0d63f3c07972a0490e1caa2bbfed4d6316204c893c8
3
+ size 17059983
ledgar/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af9ed0ec09545d39449ffddca3996a1a7774e2bd0a9d6fc09d4e9dd067892a7a
3
+ size 3313508
ledgar/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2901d9e019f5652dadda839d488155c681e50b90bd33f00574949418827867d
3
+ size 20897973
ledgar/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55ef0deada1ed75bbf13c68fdd1c1a1ebfa5b09176d5e68b92499234f51d6c9f
3
+ size 3439104
lex_glue.py DELETED
@@ -1,659 +0,0 @@
1
- # coding=utf-8
2
- # Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor.
3
- #
4
- # Licensed under the Apache License, Version 2.0 (the "License");
5
- # you may not use this file except in compliance with the License.
6
- # You may obtain a copy of the License at
7
- #
8
- # http://www.apache.org/licenses/LICENSE-2.0
9
- #
10
- # Unless required by applicable law or agreed to in writing, software
11
- # distributed under the License is distributed on an "AS IS" BASIS,
12
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- # See the License for the specific language governing permissions and
14
- # limitations under the License.
15
- """LexGLUE: A Benchmark Dataset for Legal Language Understanding in English."""
16
-
17
- import csv
18
- import json
19
- import textwrap
20
-
21
- import datasets
22
-
23
-
24
- MAIN_CITATION = """\
25
- @article{chalkidis-etal-2021-lexglue,
26
- title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},
27
- author={Chalkidis, Ilias and
28
- Jana, Abhik and
29
- Hartung, Dirk and
30
- Bommarito, Michael and
31
- Androutsopoulos, Ion and
32
- Katz, Daniel Martin and
33
- Aletras, Nikolaos},
34
- year={2021},
35
- eprint={2110.00976},
36
- archivePrefix={arXiv},
37
- primaryClass={cs.CL},
38
- note = {arXiv: 2110.00976},
39
- }"""
40
-
41
- _DESCRIPTION = """\
42
- Legal General Language Understanding Evaluation (LexGLUE) benchmark is
43
- a collection of datasets for evaluating model performance across a diverse set of legal NLU tasks
44
- """
45
-
46
- ECTHR_ARTICLES = ["2", "3", "5", "6", "8", "9", "10", "11", "14", "P1-1"]
47
-
48
- EUROVOC_CONCEPTS = [
49
- "100163",
50
- "100168",
51
- "100169",
52
- "100170",
53
- "100171",
54
- "100172",
55
- "100173",
56
- "100174",
57
- "100175",
58
- "100176",
59
- "100177",
60
- "100179",
61
- "100180",
62
- "100183",
63
- "100184",
64
- "100185",
65
- "100186",
66
- "100187",
67
- "100189",
68
- "100190",
69
- "100191",
70
- "100192",
71
- "100193",
72
- "100194",
73
- "100195",
74
- "100196",
75
- "100197",
76
- "100198",
77
- "100199",
78
- "100200",
79
- "100201",
80
- "100202",
81
- "100204",
82
- "100205",
83
- "100206",
84
- "100207",
85
- "100212",
86
- "100214",
87
- "100215",
88
- "100220",
89
- "100221",
90
- "100222",
91
- "100223",
92
- "100224",
93
- "100226",
94
- "100227",
95
- "100229",
96
- "100230",
97
- "100231",
98
- "100232",
99
- "100233",
100
- "100234",
101
- "100235",
102
- "100237",
103
- "100238",
104
- "100239",
105
- "100240",
106
- "100241",
107
- "100242",
108
- "100243",
109
- "100244",
110
- "100245",
111
- "100246",
112
- "100247",
113
- "100248",
114
- "100249",
115
- "100250",
116
- "100252",
117
- "100253",
118
- "100254",
119
- "100255",
120
- "100256",
121
- "100257",
122
- "100258",
123
- "100259",
124
- "100260",
125
- "100261",
126
- "100262",
127
- "100263",
128
- "100264",
129
- "100265",
130
- "100266",
131
- "100268",
132
- "100269",
133
- "100270",
134
- "100271",
135
- "100272",
136
- "100273",
137
- "100274",
138
- "100275",
139
- "100276",
140
- "100277",
141
- "100278",
142
- "100279",
143
- "100280",
144
- "100281",
145
- "100282",
146
- "100283",
147
- "100284",
148
- "100285",
149
- ]
150
-
151
- LEDGAR_CATEGORIES = [
152
- "Adjustments",
153
- "Agreements",
154
- "Amendments",
155
- "Anti-Corruption Laws",
156
- "Applicable Laws",
157
- "Approvals",
158
- "Arbitration",
159
- "Assignments",
160
- "Assigns",
161
- "Authority",
162
- "Authorizations",
163
- "Base Salary",
164
- "Benefits",
165
- "Binding Effects",
166
- "Books",
167
- "Brokers",
168
- "Capitalization",
169
- "Change In Control",
170
- "Closings",
171
- "Compliance With Laws",
172
- "Confidentiality",
173
- "Consent To Jurisdiction",
174
- "Consents",
175
- "Construction",
176
- "Cooperation",
177
- "Costs",
178
- "Counterparts",
179
- "Death",
180
- "Defined Terms",
181
- "Definitions",
182
- "Disability",
183
- "Disclosures",
184
- "Duties",
185
- "Effective Dates",
186
- "Effectiveness",
187
- "Employment",
188
- "Enforceability",
189
- "Enforcements",
190
- "Entire Agreements",
191
- "Erisa",
192
- "Existence",
193
- "Expenses",
194
- "Fees",
195
- "Financial Statements",
196
- "Forfeitures",
197
- "Further Assurances",
198
- "General",
199
- "Governing Laws",
200
- "Headings",
201
- "Indemnifications",
202
- "Indemnity",
203
- "Insurances",
204
- "Integration",
205
- "Intellectual Property",
206
- "Interests",
207
- "Interpretations",
208
- "Jurisdictions",
209
- "Liens",
210
- "Litigations",
211
- "Miscellaneous",
212
- "Modifications",
213
- "No Conflicts",
214
- "No Defaults",
215
- "No Waivers",
216
- "Non-Disparagement",
217
- "Notices",
218
- "Organizations",
219
- "Participations",
220
- "Payments",
221
- "Positions",
222
- "Powers",
223
- "Publicity",
224
- "Qualifications",
225
- "Records",
226
- "Releases",
227
- "Remedies",
228
- "Representations",
229
- "Sales",
230
- "Sanctions",
231
- "Severability",
232
- "Solvency",
233
- "Specific Performance",
234
- "Submission To Jurisdiction",
235
- "Subsidiaries",
236
- "Successors",
237
- "Survival",
238
- "Tax Withholdings",
239
- "Taxes",
240
- "Terminations",
241
- "Terms",
242
- "Titles",
243
- "Transactions With Affiliates",
244
- "Use Of Proceeds",
245
- "Vacations",
246
- "Venues",
247
- "Vesting",
248
- "Waiver Of Jury Trials",
249
- "Waivers",
250
- "Warranties",
251
- "Withholdings",
252
- ]
253
-
254
- SCDB_ISSUE_AREAS = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"]
255
-
256
- UNFAIR_CATEGORIES = [
257
- "Limitation of liability",
258
- "Unilateral termination",
259
- "Unilateral change",
260
- "Content removal",
261
- "Contract by using",
262
- "Choice of law",
263
- "Jurisdiction",
264
- "Arbitration",
265
- ]
266
-
267
- CASEHOLD_LABELS = ["0", "1", "2", "3", "4"]
268
-
269
-
270
- class LexGlueConfig(datasets.BuilderConfig):
271
- """BuilderConfig for LexGLUE."""
272
-
273
- def __init__(
274
- self,
275
- text_column,
276
- label_column,
277
- url,
278
- data_url,
279
- data_file,
280
- citation,
281
- label_classes=None,
282
- multi_label=None,
283
- dev_column="dev",
284
- **kwargs,
285
- ):
286
- """BuilderConfig for LexGLUE.
287
-
288
- Args:
289
- text_column: ``string`, name of the column in the jsonl file corresponding
290
- to the text
291
- label_column: `string`, name of the column in the jsonl file corresponding
292
- to the label
293
- url: `string`, url for the original project
294
- data_url: `string`, url to download the zip file from
295
- data_file: `string`, filename for data set
296
- citation: `string`, citation for the data set
297
- url: `string`, url for information about the data set
298
- label_classes: `list[string]`, the list of classes if the label is
299
- categorical. If not provided, then the label will be of type
300
- `datasets.Value('float32')`.
301
- multi_label: `boolean`, True if the task is multi-label
302
- dev_column: `string`, name for the development subset
303
- **kwargs: keyword arguments forwarded to super.
304
- """
305
- super(LexGlueConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
306
- self.text_column = text_column
307
- self.label_column = label_column
308
- self.label_classes = label_classes
309
- self.multi_label = multi_label
310
- self.dev_column = dev_column
311
- self.url = url
312
- self.data_url = data_url
313
- self.data_file = data_file
314
- self.citation = citation
315
-
316
-
317
- class LexGLUE(datasets.GeneratorBasedBuilder):
318
- """LexGLUE: A Benchmark Dataset for Legal Language Understanding in English. Version 1.0"""
319
-
320
- BUILDER_CONFIGS = [
321
- LexGlueConfig(
322
- name="ecthr_a",
323
- description=textwrap.dedent(
324
- """\
325
- The European Court of Human Rights (ECtHR) hears allegations that a state has
326
- breached human rights provisions of the European Convention of Human Rights (ECHR).
327
- For each case, the dataset provides a list of factual paragraphs (facts) from the case description.
328
- Each case is mapped to articles of the ECHR that were violated (if any)."""
329
- ),
330
- text_column="facts",
331
- label_column="violated_articles",
332
- label_classes=ECTHR_ARTICLES,
333
- multi_label=True,
334
- dev_column="dev",
335
- data_url="https://zenodo.org/record/5532997/files/ecthr.tar.gz",
336
- data_file="ecthr.jsonl",
337
- url="https://archive.org/details/ECtHR-NAACL2021",
338
- citation=textwrap.dedent(
339
- """\
340
- @inproceedings{chalkidis-etal-2021-paragraph,
341
- title = "Paragraph-level Rationale Extraction through Regularization: A case study on {E}uropean Court of Human Rights Cases",
342
- author = "Chalkidis, Ilias and
343
- Fergadiotis, Manos and
344
- Tsarapatsanis, Dimitrios and
345
- Aletras, Nikolaos and
346
- Androutsopoulos, Ion and
347
- Malakasiotis, Prodromos",
348
- booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
349
- month = jun,
350
- year = "2021",
351
- address = "Online",
352
- publisher = "Association for Computational Linguistics",
353
- url = "https://aclanthology.org/2021.naacl-main.22",
354
- doi = "10.18653/v1/2021.naacl-main.22",
355
- pages = "226--241",
356
- }
357
- }"""
358
- ),
359
- ),
360
- LexGlueConfig(
361
- name="ecthr_b",
362
- description=textwrap.dedent(
363
- """\
364
- The European Court of Human Rights (ECtHR) hears allegations that a state has
365
- breached human rights provisions of the European Convention of Human Rights (ECHR).
366
- For each case, the dataset provides a list of factual paragraphs (facts) from the case description.
367
- Each case is mapped to articles of ECHR that were allegedly violated (considered by the court)."""
368
- ),
369
- text_column="facts",
370
- label_column="allegedly_violated_articles",
371
- label_classes=ECTHR_ARTICLES,
372
- multi_label=True,
373
- dev_column="dev",
374
- url="https://archive.org/details/ECtHR-NAACL2021",
375
- data_url="https://zenodo.org/record/5532997/files/ecthr.tar.gz",
376
- data_file="ecthr.jsonl",
377
- citation=textwrap.dedent(
378
- """\
379
- @inproceedings{chalkidis-etal-2021-paragraph,
380
- title = "Paragraph-level Rationale Extraction through Regularization: A case study on {E}uropean Court of Human Rights Cases",
381
- author = "Chalkidis, Ilias
382
- and Fergadiotis, Manos
383
- and Tsarapatsanis, Dimitrios
384
- and Aletras, Nikolaos
385
- and Androutsopoulos, Ion
386
- and Malakasiotis, Prodromos",
387
- booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
388
- year = "2021",
389
- address = "Online",
390
- url = "https://aclanthology.org/2021.naacl-main.22",
391
- }
392
- }"""
393
- ),
394
- ),
395
- LexGlueConfig(
396
- name="eurlex",
397
- description=textwrap.dedent(
398
- """\
399
- European Union (EU) legislation is published in EUR-Lex portal.
400
- All EU laws are annotated by EU's Publications Office with multiple concepts from the EuroVoc thesaurus,
401
- a multilingual thesaurus maintained by the Publications Office.
402
- The current version of EuroVoc contains more than 7k concepts referring to various activities
403
- of the EU and its Member States (e.g., economics, health-care, trade).
404
- Given a document, the task is to predict its EuroVoc labels (concepts)."""
405
- ),
406
- text_column="text",
407
- label_column="labels",
408
- label_classes=EUROVOC_CONCEPTS,
409
- multi_label=True,
410
- dev_column="dev",
411
- url="https://zenodo.org/record/5363165#.YVJOAi8RqaA",
412
- data_url="https://zenodo.org/record/5532997/files/eurlex.tar.gz",
413
- data_file="eurlex.jsonl",
414
- citation=textwrap.dedent(
415
- """\
416
- @inproceedings{chalkidis-etal-2021-multieurlex,
417
- author = {Chalkidis, Ilias and
418
- Fergadiotis, Manos and
419
- Androutsopoulos, Ion},
420
- title = {MultiEURLEX -- A multi-lingual and multi-label legal document
421
- classification dataset for zero-shot cross-lingual transfer},
422
- booktitle = {Proceedings of the 2021 Conference on Empirical Methods
423
- in Natural Language Processing},
424
- year = {2021},
425
- location = {Punta Cana, Dominican Republic},
426
- }
427
- }"""
428
- ),
429
- ),
430
- LexGlueConfig(
431
- name="scotus",
432
- description=textwrap.dedent(
433
- """\
434
- The US Supreme Court (SCOTUS) is the highest federal court in the United States of America
435
- and generally hears only the most controversial or otherwise complex cases which have not
436
- been sufficiently well solved by lower courts. This is a single-label multi-class classification
437
- task, where given a document (court opinion), the task is to predict the relevant issue areas.
438
- The 14 issue areas cluster 278 issues whose focus is on the subject matter of the controversy (dispute)."""
439
- ),
440
- text_column="text",
441
- label_column="issueArea",
442
- label_classes=SCDB_ISSUE_AREAS,
443
- multi_label=False,
444
- dev_column="dev",
445
- url="http://scdb.wustl.edu/data.php",
446
- data_url="https://zenodo.org/record/5532997/files/scotus.tar.gz",
447
- data_file="scotus.jsonl",
448
- citation=textwrap.dedent(
449
- """\
450
- @misc{spaeth2020,
451
- author = {Harold J. Spaeth and Lee Epstein and Andrew D. Martin, Jeffrey A. Segal
452
- and Theodore J. Ruger and Sara C. Benesh},
453
- year = {2020},
454
- title ={{Supreme Court Database, Version 2020 Release 01}},
455
- url= {http://Supremecourtdatabase.org},
456
- howpublished={Washington University Law}
457
- }"""
458
- ),
459
- ),
460
- LexGlueConfig(
461
- name="ledgar",
462
- description=textwrap.dedent(
463
- """\
464
- LEDGAR dataset aims contract provision (paragraph) classification.
465
- The contract provisions come from contracts obtained from the US Securities and Exchange Commission (SEC)
466
- filings, which are publicly available from EDGAR. Each label represents the single main topic
467
- (theme) of the corresponding contract provision."""
468
- ),
469
- text_column="text",
470
- label_column="clause_type",
471
- label_classes=LEDGAR_CATEGORIES,
472
- multi_label=False,
473
- dev_column="dev",
474
- url="https://metatext.io/datasets/ledgar",
475
- data_url="https://zenodo.org/record/5532997/files/ledgar.tar.gz",
476
- data_file="ledgar.jsonl",
477
- citation=textwrap.dedent(
478
- """\
479
- @inproceedings{tuggener-etal-2020-ledgar,
480
- title = "{LEDGAR}: A Large-Scale Multi-label Corpus for Text Classification of Legal Provisions in Contracts",
481
- author = {Tuggener, Don and
482
- von D{\"a}niken, Pius and
483
- Peetz, Thomas and
484
- Cieliebak, Mark},
485
- booktitle = "Proceedings of the 12th Language Resources and Evaluation Conference",
486
- year = "2020",
487
- address = "Marseille, France",
488
- url = "https://aclanthology.org/2020.lrec-1.155",
489
- }
490
- }"""
491
- ),
492
- ),
493
- LexGlueConfig(
494
- name="unfair_tos",
495
- description=textwrap.dedent(
496
- """\
497
- The UNFAIR-ToS dataset contains 50 Terms of Service (ToS) from on-line platforms (e.g., YouTube,
498
- Ebay, Facebook, etc.). The dataset has been annotated on the sentence-level with 8 types of
499
- unfair contractual terms (sentences), meaning terms that potentially violate user rights
500
- according to the European consumer law."""
501
- ),
502
- text_column="text",
503
- label_column="labels",
504
- label_classes=UNFAIR_CATEGORIES,
505
- multi_label=True,
506
- dev_column="val",
507
- url="http://claudette.eui.eu",
508
- data_url="https://zenodo.org/record/5532997/files/unfair_tos.tar.gz",
509
- data_file="unfair_tos.jsonl",
510
- citation=textwrap.dedent(
511
- """\
512
- @article{lippi-etal-2019-claudette,
513
- title = "{CLAUDETTE}: an automated detector of potentially unfair clauses in online terms of service",
514
- author = {Lippi, Marco
515
- and Pałka, Przemysław
516
- and Contissa, Giuseppe
517
- and Lagioia, Francesca
518
- and Micklitz, Hans-Wolfgang
519
- and Sartor, Giovanni
520
- and Torroni, Paolo},
521
- journal = "Artificial Intelligence and Law",
522
- year = "2019",
523
- publisher = "Springer",
524
- url = "https://doi.org/10.1007/s10506-019-09243-2",
525
- pages = "117--139",
526
- }"""
527
- ),
528
- ),
529
- LexGlueConfig(
530
- name="case_hold",
531
- description=textwrap.dedent(
532
- """\
533
- The CaseHOLD (Case Holdings on Legal Decisions) dataset contains approx. 53k multiple choice
534
- questions about holdings of US court cases from the Harvard Law Library case law corpus.
535
- Holdings are short summaries of legal rulings accompany referenced decisions relevant for the present case.
536
- The input consists of an excerpt (or prompt) from a court decision, containing a reference
537
- to a particular case, while the holding statement is masked out. The model must identify
538
- the correct (masked) holding statement from a selection of five choices."""
539
- ),
540
- text_column="text",
541
- label_column="labels",
542
- dev_column="dev",
543
- multi_label=False,
544
- label_classes=CASEHOLD_LABELS,
545
- url="https://github.com/reglab/casehold",
546
- data_url="https://zenodo.org/record/5532997/files/casehold.tar.gz",
547
- data_file="casehold.csv",
548
- citation=textwrap.dedent(
549
- """\
550
- @inproceedings{Zheng2021,
551
- author = {Lucia Zheng and
552
- Neel Guha and
553
- Brandon R. Anderson and
554
- Peter Henderson and
555
- Daniel E. Ho},
556
- title = {When Does Pretraining Help? Assessing Self-Supervised Learning for
557
- Law and the CaseHOLD Dataset},
558
- year = {2021},
559
- booktitle = {International Conference on Artificial Intelligence and Law},
560
- }"""
561
- ),
562
- ),
563
- ]
564
-
565
- def _info(self):
566
- if self.config.name == "case_hold":
567
- features = {
568
- "context": datasets.Value("string"),
569
- "endings": datasets.features.Sequence(datasets.Value("string")),
570
- }
571
- elif "ecthr" in self.config.name:
572
- features = {"text": datasets.features.Sequence(datasets.Value("string"))}
573
- else:
574
- features = {"text": datasets.Value("string")}
575
- if self.config.multi_label:
576
- features["labels"] = datasets.features.Sequence(datasets.ClassLabel(names=self.config.label_classes))
577
- else:
578
- features["label"] = datasets.ClassLabel(names=self.config.label_classes)
579
- return datasets.DatasetInfo(
580
- description=self.config.description,
581
- features=datasets.Features(features),
582
- homepage=self.config.url,
583
- citation=self.config.citation + "\n" + MAIN_CITATION,
584
- )
585
-
586
- def _split_generators(self, dl_manager):
587
- archive = dl_manager.download(self.config.data_url)
588
- return [
589
- datasets.SplitGenerator(
590
- name=datasets.Split.TRAIN,
591
- # These kwargs will be passed to _generate_examples
592
- gen_kwargs={
593
- "filepath": self.config.data_file,
594
- "split": "train",
595
- "files": dl_manager.iter_archive(archive),
596
- },
597
- ),
598
- datasets.SplitGenerator(
599
- name=datasets.Split.TEST,
600
- # These kwargs will be passed to _generate_examples
601
- gen_kwargs={
602
- "filepath": self.config.data_file,
603
- "split": "test",
604
- "files": dl_manager.iter_archive(archive),
605
- },
606
- ),
607
- datasets.SplitGenerator(
608
- name=datasets.Split.VALIDATION,
609
- # These kwargs will be passed to _generate_examples
610
- gen_kwargs={
611
- "filepath": self.config.data_file,
612
- "split": self.config.dev_column,
613
- "files": dl_manager.iter_archive(archive),
614
- },
615
- ),
616
- ]
617
-
618
- def _generate_examples(self, filepath, split, files):
619
- """This function returns the examples in the raw (text) form."""
620
- if self.config.name == "case_hold":
621
- if "dummy" in filepath:
622
- SPLIT_RANGES = {"train": (1, 3), "dev": (3, 5), "test": (5, 7)}
623
- else:
624
- SPLIT_RANGES = {"train": (1, 45001), "dev": (45001, 48901), "test": (48901, 52501)}
625
- for path, f in files:
626
- if path == filepath:
627
- f = (line.decode("utf-8") for line in f)
628
- for id_, row in enumerate(list(csv.reader(f))[SPLIT_RANGES[split][0] : SPLIT_RANGES[split][1]]):
629
- yield id_, {
630
- "context": row[1],
631
- "endings": [row[2], row[3], row[4], row[5], row[6]],
632
- "label": str(row[12]),
633
- }
634
- break
635
- elif self.config.multi_label:
636
- for path, f in files:
637
- if path == filepath:
638
- for id_, row in enumerate(f):
639
- data = json.loads(row.decode("utf-8"))
640
- labels = sorted(
641
- list(set(data[self.config.label_column]).intersection(set(self.config.label_classes)))
642
- )
643
- if data["data_type"] == split:
644
- yield id_, {
645
- "text": data[self.config.text_column],
646
- "labels": labels,
647
- }
648
- break
649
- else:
650
- for path, f in files:
651
- if path == filepath:
652
- for id_, row in enumerate(f):
653
- data = json.loads(row.decode("utf-8"))
654
- if data["data_type"] == split:
655
- yield id_, {
656
- "text": data[self.config.text_column],
657
- "label": data[self.config.label_column],
658
- }
659
- break
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
scotus/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1116b7762ec235264723c6f68509572620b616118db623ec6bbc3671fcbb1b96
3
+ size 39976265
scotus/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9a7288e9bd124ec344759f49c855a5079b7d98bed2ee86c51c6b2c65b51c4503
3
+ size 94360448
scotus/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9b858a6e7fde006e0dcdf4d1253e8eabfe040a84ad13ef45157f00e9b8d5c8b5
3
+ size 39074686
unfair_tos/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cf3a30be32f5635bc269b12685290a27b144ad837391e776a2070ff0c3a521c4
3
+ size 146864
unfair_tos/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:09d6d53aa05a1338d399da97f36cae171ca0a85990402318d134a8c668c86182
3
+ size 500893
unfair_tos/validation-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6429ccec1085241b05083880fb73548361bc8fd05a6764152f9b8e43e4c177e6
3
+ size 217847