system HF staff commited on
Commit
5912711
0 Parent(s):

Update files from the datasets library (from 1.13.0)

Browse files

Release notes: https://github.com/huggingface/datasets/releases/tag/1.13.0

.gitattributes ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.model filter=lfs diff=lfs merge=lfs -text
12
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
13
+ *.onnx filter=lfs diff=lfs merge=lfs -text
14
+ *.ot filter=lfs diff=lfs merge=lfs -text
15
+ *.parquet filter=lfs diff=lfs merge=lfs -text
16
+ *.pb filter=lfs diff=lfs merge=lfs -text
17
+ *.pt filter=lfs diff=lfs merge=lfs -text
18
+ *.pth filter=lfs diff=lfs merge=lfs -text
19
+ *.rar filter=lfs diff=lfs merge=lfs -text
20
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
22
+ *.tflite filter=lfs diff=lfs merge=lfs -text
23
+ *.tgz filter=lfs diff=lfs merge=lfs -text
24
+ *.xz filter=lfs diff=lfs merge=lfs -text
25
+ *.zip filter=lfs diff=lfs merge=lfs -text
26
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
27
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,409 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: LexGLUE
3
+ annotations_creators:
4
+ - found
5
+ language_creators:
6
+ - found
7
+ languages:
8
+ - en
9
+ licenses:
10
+ - cc-by-4-0
11
+ multilinguality:
12
+ - monolingual
13
+ size_categories:
14
+ - 10K<n<100K
15
+ source_datasets:
16
+ - extended
17
+ task_categories:
18
+ ecthr_a:
19
+ - text-classification
20
+ ecthr_b:
21
+ - text-classification
22
+ eurlex:
23
+ - text-classification
24
+ scotus:
25
+ - text-classification
26
+ unfair_tos:
27
+ - text-classification
28
+ ledgar:
29
+ - text-classification
30
+ case_hold:
31
+ - question-answering
32
+ task_ids:
33
+ ecthr_a:
34
+ - multi-label-classification
35
+ ecthr_b:
36
+ - multi-label-classification
37
+ eurlex:
38
+ - multi-label-classification
39
+ - topic-classification
40
+ scotus:
41
+ - multi-class-classification
42
+ - topic-classification
43
+ ledgar:
44
+ - multi-class-classification
45
+ - topic-classification
46
+ unfair_tos:
47
+ - multi-label-classification
48
+ case_hold:
49
+ - multiple-choice-qa
50
+ ---
51
+
52
+ # Dataset Card for "LexGLUE"
53
+
54
+ ## Table of Contents
55
+ - [Dataset Description](#dataset-description)
56
+ - [Dataset Summary](#dataset-summary)
57
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
58
+ - [Languages](#languages)
59
+ - [Dataset Structure](#dataset-structure)
60
+ - [Data Instances](#data-instances)
61
+ - [Data Fields](#data-fields)
62
+ - [Data Splits](#data-splits)
63
+ - [Dataset Creation](#dataset-creation)
64
+ - [Curation Rationale](#curation-rationale)
65
+ - [Source Data](#source-data)
66
+ - [Annotations](#annotations)
67
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
68
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
69
+ - [Social Impact of Dataset](#social-impact-of-dataset)
70
+ - [Discussion of Biases](#discussion-of-biases)
71
+ - [Other Known Limitations](#other-known-limitations)
72
+ - [Additional Information](#additional-information)
73
+ - [Dataset Curators](#dataset-curators)
74
+ - [Licensing Information](#licensing-information)
75
+ - [Citation Information](#citation-information)
76
+ - [Contributions](#contributions)
77
+
78
+ ## Dataset Description
79
+
80
+ - **Homepage:** https://github.com/coastalcph/lex-glue
81
+ - **Repository:** https://github.com/coastalcph/lex-glue
82
+ - **Paper:** https://arxiv.org/abs/2110.00976
83
+ - **Leaderboard:** https://github.com/coastalcph/lex-glue
84
+ - **Point of Contact:** [Ilias Chalkidis](mailto:ilias.chalkidis@di.ku.dk)
85
+
86
+ ### Dataset Summary
87
+
88
+ Inspired by the recent widespread use of the GLUE multi-task benchmark NLP dataset (Wang et al., 2018), the subsequent more difficult SuperGLUE (Wang et al., 2019), other previous multi-task NLP benchmarks (Conneau and Kiela, 2018; McCann et al., 2018), and similar initiatives in other domains (Peng et al., 2019), we introduce the *Legal General Language Understanding Evaluation (LexGLUE) benchmark*, a benchmark dataset to evaluate the performance of NLP methods in legal tasks. LexGLUE is based on seven existing legal NLP datasets, selected using criteria largely from SuperGLUE.
89
+
90
+ As in GLUE and SuperGLUE (Wang et al., 2019b,a), one of our goals is to push towards generic (or ‘foundation’) models that can cope with multiple NLP tasks, in our case legal NLP tasks possibly with limited task-specific fine-tuning. Another goal is to provide a convenient and informative entry point for NLP researchers and practitioners wishing to explore or develop methods for legalNLP. Having these goals in mind, the datasets we include in LexGLUE and the tasks they address have been simplified in several ways to make it easier for newcomers and generic models to address all tasks.
91
+
92
+ LexGLUE benchmark is accompanied by experimental infrastructure that relies on Hugging Face Transformers library and resides at: https://github.com/coastalcph/lex-glue.
93
+
94
+ ### Supported Tasks and Leaderboards
95
+
96
+ The supported tasks are the following:
97
+
98
+ <table>
99
+ <tr><td>Dataset</td><td>Source</td><td>Sub-domain</td><td>Task Type</td><td>Classes</td><tr>
100
+ <tr><td>ECtHR (Task A)</td><td> <a href="https://aclanthology.org/P19-1424/">Chalkidis et al. (2019)</a> </td><td>ECHR</td><td>Multi-label classification</td><td>10+1</td></tr>
101
+ <tr><td>ECtHR (Task B)</td><td> <a href="https://aclanthology.org/2021.naacl-main.22/">Chalkidis et al. (2021a)</a> </td><td>ECHR</td><td>Multi-label classification </td><td>10</td></tr>
102
+ <tr><td>SCOTUS</td><td> <a href="http://scdb.wustl.edu">Spaeth et al. (2020)</a></td><td>US Law</td><td>Multi-class classification</td><td>14</td></tr>
103
+ <tr><td>EUR-LEX</td><td> <a href="https://arxiv.org/abs/2109.00904">Chalkidis et al. (2021b)</a></td><td>EU Law</td><td>Multi-label classification</td><td>100</td></tr>
104
+ <tr><td>LEDGAR</td><td> <a href="https://aclanthology.org/2020.lrec-1.155/">Tuggener et al. (2020)</a></td><td>Contracts</td><td>Multi-class classification</td><td>100</td></tr>
105
+ <tr><td>UNFAIR-ToS</td><td><a href="https://arxiv.org/abs/1805.01217"> Lippi et al. (2019)</a></td><td>Contracts</td><td>Multi-label classification</td><td>8+1</td></tr>
106
+ <tr><td>CaseHOLD</td><td><a href="https://arxiv.org/abs/2104.08671">Zheng et al. (2021)</a></td><td>US Law</td><td>Multiple choice QA</td><td>n/a</td></tr>
107
+ </table>
108
+
109
+ #### ecthr_a
110
+
111
+ The European Court of Human Rights (ECtHR) hears allegations that a state has breached human rights provisions of the European Convention of Human Rights (ECHR). For each case, the dataset provides a list of factual paragraphs (facts) from the case description. Each case is mapped to articles of the ECHR that were violated (if any).
112
+
113
+ #### ecthr_b
114
+
115
+ The European Court of Human Rights (ECtHR) hears allegations that a state has breached human rights provisions of the European Convention of Human Rights (ECHR). For each case, the dataset provides a list of factual paragraphs (facts) from the case description. Each case is mapped to articles of ECHR that were allegedly violated (considered by the court).
116
+
117
+ #### scotus
118
+
119
+ The US Supreme Court (SCOTUS) is the highest federal court in the United States of America and generally hears only the most controversial or otherwise complex cases which have not been sufficiently well solved by lower courts. This is a single-label multi-class classification task, where given a document (court opinion), the task is to predict the relevant issue areas. The 14 issue areas cluster 278 issues whose focus is on the subject matter of the controversy (dispute).
120
+
121
+ #### eurlex
122
+
123
+ European Union (EU) legislation is published in EUR-Lex portal. All EU laws are annotated by EU's Publications Office with multiple concepts from the EuroVoc thesaurus, a multilingual thesaurus maintained by the Publications Office. The current version of EuroVoc contains more than 7k concepts referring to various activities of the EU and its Member States (e.g., economics, health-care, trade). Given a document, the task is to predict its EuroVoc labels (concepts).
124
+
125
+ #### ledgar
126
+
127
+ LEDGAR dataset aims contract provision (paragraph) classification. The contract provisions come from contracts obtained from the US Securities and Exchange Commission (SEC) filings, which are publicly available from EDGAR. Each label represents the single main topic (theme) of the corresponding contract provision.
128
+
129
+ #### unfair_tos
130
+
131
+ The UNFAIR-ToS dataset contains 50 Terms of Service (ToS) from on-line platforms (e.g., YouTube, Ebay, Facebook, etc.). The dataset has been annotated on the sentence-level with 8 types of unfair contractual terms (sentences), meaning terms that potentially violate user rights according to the European consumer law.
132
+
133
+ #### case_hold
134
+
135
+ The CaseHOLD (Case Holdings on Legal Decisions) dataset includes multiple choice questions about holdings of US court cases from the Harvard Law Library case law corpus. Holdings are short summaries of legal rulings accompany referenced decisions relevant for the present case. The input consists of an excerpt (or prompt) from a court decision, containing a reference to a particular case, while the holding statement is masked out. The model must identify the correct (masked) holding statement from a selection of five choices.
136
+
137
+
138
+ The current leaderboard includes several Transformer-based (Vaswaniet al., 2017) pre-trained language models, which achieve state-of-the-art performance in most NLP tasks (Bommasani et al., 2021) and NLU benchmarks (Wang et al., 2019a).
139
+
140
+
141
+ <table>
142
+ <tr><td>Dataset</td><td>ECtHR Task A </td><td>ECtHR Task B </td><td>SCOTUS </td><td>EUR-LEX</td><td>LEDGAR </td><td>UNFAIR-ToS </td><td>CaseHOLD</td></tr>
143
+ <tr><td>Model</td><td>μ-F1 / m-F1 </td><td>μ-F1 / m-F1 </td><td>μ-F1 / m-F1 </td><td>μ-F1 / m-F1 </td><td>μ-F1 / m-F1 </td><td>μ-F1 / m-F1</td><td>μ-F1 / m-F1 </td></tr>
144
+ <tr><td>BERT </td><td><b>71.4</b> / 64.0 </td><td>87.6 / <b>77.8</b> </td><td>70.5 / 60.9 </td><td>71.6 / 55.6 </td><td>87.7 / 82.2 </td><td>97.3 / 80.4</td><td>70.7 </td></tr>
145
+ <tr><td>RoBERTa </td><td>69.5 / 60.7 </td><td>87.2 / 77.3 </td><td>70.8 / 61.2 </td><td>71.8 / <b>57.5</b> </td><td>87.9 / 82.1 </td><td>97.2 / 79.6</td><td>71.7 </td></tr>
146
+ <tr><td>DeBERTa </td><td>69.1 / 61.2 </td><td>87.4 / 77.3 </td><td>70.0 / 60.0 </td><td><b>72.3</b> / 57.2 </td><td>87.9 / 82.0 </td><td>97.2 / 80.2</td><td>72.1 </td></tr>
147
+ <tr><td>Longformer </td><td>69.6 / 62.4 </td><td>88.0 / <b>77.8</b> </td><td>72.2 / 62.5 </td><td>71.9 / 56.7 </td><td>87.7 / 82.3 </td><td><b>97.5</b> / 81.0</td><td>72.0 </td></tr>
148
+ <tr><td>BigBird </td><td>70.5 / 63.8 </td><td> <b>88.1</b> / 76.6 </td><td>71.7 / 61.4 </td><td>71.8 / 56.6 </td><td>87.7 / 82.1 </td><td>97.4 / 81.1</td><td>70.4 </td></tr>
149
+ <tr><td>Legal-BERT </td><td>71.2 / <b>64.6</b> </td><td>88.0 / 77.2 </td><td>76.2 / 65.8 </td><td>72.2 / 56.2 </td><td><b>88.1</b> / <b>82.7</b></td><td> 97.4 / <b>83.4</b></td><td>75.1</td></tr>
150
+ <tr><td>CaseLaw-BERT </td><td>71.2 / 64.2 </td><td>88.0 / 77.5 </td><td><b>76.4</b> / <b>66.2</b> </td><td>71.0 / 55.9 </td><td>88.0 / 82.3</td><td>97.4 / 82.4</td><td><b>75.6</b> </td></tr>
151
+ </table>
152
+
153
+ ### Languages
154
+
155
+ We only consider English datasets, to make experimentation easier for researchers across the globe.
156
+
157
+ ## Dataset Structure
158
+
159
+ ### Data Instances
160
+
161
+ #### ecthr_a
162
+
163
+ An example of 'train' looks as follows.
164
+ ```json
165
+ {
166
+ "text": ["8. The applicant was arrested in the early morning of 21 October 1990 ...", ...],
167
+ "labels": [6]
168
+ }
169
+ ```
170
+
171
+ #### ecthr_b
172
+
173
+ An example of 'train' looks as follows.
174
+ ```json
175
+ {
176
+ "text": ["8. The applicant was arrested in the early morning of 21 October 1990 ...", ...],
177
+ "label": [5, 6]
178
+ }
179
+ ```
180
+
181
+ #### scotus
182
+
183
+ An example of 'train' looks as follows.
184
+ ```json
185
+ {
186
+ "text": "Per Curiam\nSUPREME COURT OF THE UNITED STATES\nRANDY WHITE, WARDEN v. ROGER L. WHEELER\n Decided December 14, 2015\nPER CURIAM.\nA death sentence imposed by a Kentucky trial court and\naffirmed by the ...",
187
+ "label": 8
188
+ }
189
+ ```
190
+
191
+ #### eurlex
192
+
193
+ An example of 'train' looks as follows.
194
+ ```json
195
+ {
196
+ "text": "COMMISSION REGULATION (EC) No 1629/96 of 13 August 1996 on an invitation to tender for the refund on export of wholly milled round grain rice to certain third countries ...",
197
+ "labels": [2, 42, 72, 76, 86]
198
+ }
199
+ ```
200
+
201
+ #### ledgar
202
+
203
+ An example of 'train' looks as follows.
204
+ ```json
205
+ {
206
+ "text": "All Taxes shall be the financial responsibility of the party obligated to pay such Taxes as determined by applicable law and neither party is or shall be liable at any time for any of the other party ...",
207
+ "label": 32
208
+ }
209
+ ```
210
+
211
+ #### unfair_tos
212
+
213
+ An example of 'train' looks as follows.
214
+ ```json
215
+ {
216
+ "text": "tinder may terminate your account at any time without notice if it believes that you have violated this agreement.",
217
+ "label": 2
218
+ }
219
+ ```
220
+
221
+ #### casehold
222
+
223
+ An example of 'test' looks as follows.
224
+ ```json
225
+ {
226
+ "contexts": ["In Granato v. City and County of Denver, No. CIV 11-0304 MSK/BNB, 2011 WL 3820730 (D.Colo. Aug. 20, 2011), the Honorable Marcia S. Krieger, now-Chief United States District Judge for the District of Colorado, ruled similarly: At a minimum, a party asserting a Mo-nell claim must plead sufficient facts to identify ... to act pursuant to City or State policy, custom, decision, ordinance, re d 503, 506-07 (3d Cir.l985)(<HOLDING>).",
227
+ "In Granato v. City and County of Denver, No. CIV 11-0304 MSK/BNB, 2011 WL 3820730 (D.Colo. Aug. 20, 2011), the Honorable Marcia S. Krieger, now-Chief United States District Judge for the District of Colorado, ruled similarly: At a minimum, a party asserting a Mo-nell claim must plead sufficient facts to identify ... to act pursuant to City or State policy, custom, decision, ordinance, re d 503, 506-07 (3d Cir.l985)(<HOLDING>).",
228
+ "In Granato v. City and County of Denver, No. CIV 11-0304 MSK/BNB, 2011 WL 3820730 (D.Colo. Aug. 20, 2011), the Honorable Marcia S. Krieger, now-Chief United States District Judge for the District of Colorado, ruled similarly: At a minimum, a party asserting a Mo-nell claim must plead sufficient facts to identify ... to act pursuant to City or State policy, custom, decision, ordinance, re d 503, 506-07 (3d Cir.l985)(<HOLDING>).",
229
+ "In Granato v. City and County of Denver, No. CIV 11-0304 MSK/BNB, 2011 WL 3820730 (D.Colo. Aug. 20, 2011), the Honorable Marcia S. Krieger, now-Chief United States District Judge for the District of Colorado, ruled similarly: At a minimum, a party asserting a Mo-nell claim must plead sufficient facts to identify ... to act pursuant to City or State policy, custom, decision, ordinance, re d 503, 506-07 (3d Cir.l985)(<HOLDING>).",
230
+ "In Granato v. City and County of Denver, No. CIV 11-0304 MSK/BNB, 2011 WL 3820730 (D.Colo. Aug. 20, 2011), the Honorable Marcia S. Krieger, now-Chief United States District Judge for the District of Colorado, ruled similarly: At a minimum, a party asserting a Mo-nell claim must plead sufficient facts to identify ... to act pursuant to City or State policy, custom, decision, ordinance, re d 503, 506-07 (3d Cir.l985)(<HOLDING>).",
231
+ ],
232
+ "endings": ["holding that courts are to accept allegations in the complaint as being true including monell policies and writing that a federal court reviewing the sufficiency of a complaint has a limited task",
233
+ "holding that for purposes of a class certification motion the court must accept as true all factual allegations in the complaint and may draw reasonable inferences therefrom",
234
+ "recognizing that the allegations of the complaint must be accepted as true on a threshold motion to dismiss",
235
+ "holding that a court need not accept as true conclusory allegations which are contradicted by documents referred to in the complaint",
236
+ "holding that where the defendant was in default the district court correctly accepted the fact allegations of the complaint as true"
237
+ ],
238
+ "label": 0
239
+ }
240
+ ```
241
+
242
+ ### Data Fields
243
+
244
+ #### ecthr_a
245
+ - `text`: a list of `string` features (list of factual paragraphs (facts) from the case description).
246
+ - `labels`: a list of classification labels (a list of violated ECHR articles, if any) .
247
+ <details>
248
+ <summary>List of ECHR articles</summary>
249
+ "Article 2", "Article 3", "Article 5", "Article 6", "Article 8", "Article 9", "Article 10", "Article 11", "Article 14", "Article 1 of Protocol 1"
250
+ </details>
251
+
252
+ #### ecthr_b
253
+ - `text`: a list of `string` features (list of factual paragraphs (facts) from the case description)
254
+ - `labels`: a list of classification labels (a list of articles considered).
255
+ <details>
256
+ <summary>List of ECHR articles</summary>
257
+ "Article 2", "Article 3", "Article 5", "Article 6", "Article 8", "Article 9", "Article 10", "Article 11", "Article 14", "Article 1 of Protocol 1"
258
+ </details>
259
+
260
+ #### scotus
261
+ - `text`: a `string` feature (the court opinion).
262
+ - `label`: a classification label (the relevant issue area).
263
+ <details>
264
+ <summary>List of issue areas</summary>
265
+ (1, Criminal Procedure), (2, Civil Rights), (3, First Amendment), (4, Due Process), (5, Privacy), (6, Attorneys), (7, Unions), (8, Economic Activity), (9, Judicial Power), (10, Federalism), (11, Interstate Relations), (12, Federal Taxation), (13, Miscellaneous), (14, Private Action)
266
+ </details>
267
+
268
+ #### eurlex
269
+ - `text`: a `string` feature (an EU law).
270
+ - `labels`: a list of classification labels (a list of relevant EUROVOC concepts).
271
+ <details>
272
+ <summary>List of EUROVOC concepts</summary>
273
+ The list is very long including 100 EUROVOC concepts. You can find the EUROVOC concepts descriptors <a href="https://raw.githubusercontent.com/nlpaueb/multi-eurlex/master/data/eurovoc_descriptors.json">here</a>.
274
+ </details>
275
+
276
+ #### ledgar
277
+ - `text`: a `string` feature (a contract provision/paragraph).
278
+ - `label`: a classification label (the type of contract provision).
279
+ <details>
280
+ <summary>List of contract provision types</summary>
281
+ "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",
282
+ </details>
283
+
284
+ #### unfair_tos
285
+ - `text`: a `string` feature (a ToS sentence)
286
+ - `labels`: a list of classification labels (a list of unfair types, if any).
287
+ <details>
288
+ <summary>List of unfair types</summary>
289
+ "Limitation of liability", "Unilateral termination", "Unilateral change", "Content removal", "Contract by using", "Choice of law", "Jurisdiction", "Arbitration"
290
+ </details>
291
+
292
+ #### casehold
293
+ - `context`: a `string` feature (a context sentence incl. a masked holding statement).
294
+ - `holdings`: a list of `string` features (a list of candidate holding statements).
295
+ - `label`: a classification label (the id of the original/correct holding).
296
+
297
+
298
+ ### Data Splits
299
+
300
+ <table>
301
+ <tr><td>Dataset </td><td>Training</td><td>Development</td><td>Test</td><td>Total</td></tr>
302
+ <tr><td>ECtHR (Task A)</td><td>9,000</td><td>1,000</td><td>1,000</td><td>11,000</td></tr>
303
+ <tr><td>ECtHR (Task B)</td><td>9,000</td><td>1,000</td><td>1,000</td><td>11,000</td></tr>
304
+ <tr><td>SCOTUS</td><td>5,000</td><td>1,400</td><td>1,400</td><td>7,800</td></tr>
305
+ <tr><td>EUR-LEX</td><td>55,000</td><td>5,000</td><td>5,000</td><td>65,000</td></tr>
306
+ <tr><td>LEDGAR</td><td>60,000</td><td>10,000</td><td>10,000</td><td>80,000</td></tr>
307
+ <tr><td>UNFAIR-ToS</td><td>5,532</td><td>2,275</td><td>1,607</td><td>9,414</td></tr>
308
+ <tr><td>CaseHOLD</td><td>45,000</td><td>3,900</td><td>3,900</td><td>52,800</td></tr>
309
+ </table>
310
+
311
+ ## Dataset Creation
312
+
313
+ ### Curation Rationale
314
+
315
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
316
+
317
+ ### Source Data
318
+ <table>
319
+ <tr><td>Dataset</td><td>Source</td><td>Sub-domain</td><td>Task Type</td><tr>
320
+ <tr><td>ECtHR (Task A)</td><td> <a href="https://aclanthology.org/P19-1424/">Chalkidis et al. (2019)</a> </td><td>ECHR</td><td>Multi-label classification</td></tr>
321
+ <tr><td>ECtHR (Task B)</td><td> <a href="https://aclanthology.org/2021.naacl-main.22/">Chalkidis et al. (2021a)</a> </td><td>ECHR</td><td>Multi-label classification </td></tr>
322
+ <tr><td>SCOTUS</td><td> <a href="http://scdb.wustl.edu">Spaeth et al. (2020)</a></td><td>US Law</td><td>Multi-class classification</td></tr>
323
+ <tr><td>EUR-LEX</td><td> <a href="https://arxiv.org/abs/2109.00904">Chalkidis et al. (2021b)</a></td><td>EU Law</td><td>Multi-label classification</td></tr>
324
+ <tr><td>LEDGAR</td><td> <a href="https://aclanthology.org/2020.lrec-1.155/">Tuggener et al. (2020)</a></td><td>Contracts</td><td>Multi-class classification</td></tr>
325
+ <tr><td>UNFAIR-ToS</td><td><a href="https://arxiv.org/abs/1805.01217"> Lippi et al. (2019)</a></td><td>Contracts</td><td>Multi-label classification</td></tr>
326
+ <tr><td>CaseHOLD</td><td><a href="https://arxiv.org/abs/2104.08671">Zheng et al. (2021)</a></td><td>US Law</td><td>Multiple choice QA</td></tr>
327
+ </table>
328
+
329
+ #### Initial Data Collection and Normalization
330
+
331
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
332
+
333
+ #### Who are the source language producers?
334
+
335
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
336
+
337
+ ### Annotations
338
+
339
+ #### Annotation process
340
+
341
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
342
+
343
+ #### Who are the annotators?
344
+
345
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
346
+
347
+ ### Personal and Sensitive Information
348
+
349
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
350
+
351
+ ## Considerations for Using the Data
352
+
353
+ ### Social Impact of Dataset
354
+
355
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
356
+
357
+
358
+ ### Discussion of Biases
359
+
360
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
361
+
362
+
363
+ ### Other Known Limitations
364
+
365
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
366
+
367
+
368
+ ## Additional Information
369
+
370
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
371
+
372
+
373
+ ### Dataset Curators
374
+
375
+ *Ilias Chalkidis, Abhik Jana, Dirk Hartung, Michael Bommarito, Ion Androutsopoulos, Daniel Martin Katz, and Nikolaos Aletras.*
376
+ *LexGLUE: A Benchmark Dataset for Legal Language Understanding in English.*
377
+ *Arxiv Preprint. 2021*
378
+
379
+
380
+ ### Licensing Information
381
+
382
+ [More Information Needed](https://github.com/huggingface/datasets/blob/master/CONTRIBUTING.md#how-to-contribute-to-the-dataset-cards)
383
+
384
+ ### Citation Information
385
+
386
+ [*Ilias Chalkidis, Abhik Jana, Dirk Hartung, Michael Bommarito, Ion Androutsopoulos, Daniel Martin Katz, and Nikolaos Aletras.*
387
+ *LexGLUE: A Benchmark Dataset for Legal Language Understanding in English.*
388
+ *2021. arXiv: 2110.00976.*](https://arxiv.org/abs/2110.00976)
389
+ ```
390
+ @article{chalkidis-etal-2021-lexglue,
391
+ title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},
392
+ author={Chalkidis, Ilias and
393
+ Jana, Abhik and
394
+ Hartung, Dirk and
395
+ Bommarito, Michael and
396
+ Androutsopoulos, Ion and
397
+ Katz, Daniel Martin and
398
+ Aletras, Nikolaos},
399
+ year={2021},
400
+ eprint={2110.00976},
401
+ archivePrefix={arXiv},
402
+ primaryClass={cs.CL},
403
+ note = {arXiv: 2110.00976},
404
+ }
405
+ ```
406
+
407
+ ### Contributions
408
+
409
+ Thanks to [@iliaschalkidis](https://github.com/iliaschalkidis) for adding this dataset.
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
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). \nThe dataset contains approx. 11K cases from the ECtHR public database. \nThe cases are chronologically split into training (9k, 2001--2016), \ndevelopment (1k, 2016--2017), and test (1k, 2017--2019). \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@misc{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={xxxx.xxxxx},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\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"], "names_file": null, "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@misc{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={xxxx.xxxxx},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\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"], "names_file": null, "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@misc{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={xxxx.xxxxx},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}", "homepage": "https://zenodo.org/record/5363165#.YVJOAi8RqaA", "license": "", "features": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "labels": {"feature": {"num_classes": 127, "names": ["100163", "100164", "100165", "100166", "100167", "100168", "100169", "100170", "100171", "100172", "100173", "100174", "100175", "100176", "100177", "100178", "100179", "100180", "100181", "100182", "100183", "100184", "100185", "100186", "100187", "100188", "100189", "100190", "100191", "100192", "100193", "100194", "100195", "100196", "100197", "100198", "100199", "100200", "100201", "100202", "100203", "100204", "100205", "100206", "100207", "100208", "100209", "100210", "100211", "100212", "100213", "100214", "100215", "100216", "100217", "100218", "100219", "100220", "100221", "100222", "100223", "100224", "100225", "100226", "100227", "100228", "100229", "100230", "100231", "100232", "100233", "100234", "100235", "100236", "100237", "100238", "100239", "100240", "100241", "100242", "100243", "100244", "100245", "100246", "100247", "100248", "100249", "100250", "100251", "100252", "100253", "100254", "100255", "100256", "100257", "100258", "100259", "100260", "100261", "100262", "100263", "100264", "100265", "100266", "100267", "100268", "100269", "100270", "100271", "100272", "100273", "100274", "100275", "100276", "100277", "100278", "100279", "100280", "100281", "100282", "100283", "100284", "100285", "100286", "100287", "100288", "100289"], "names_file": null, "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": 390789505, "num_examples": 55000, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 59742502, "num_examples": 5000, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 41546764, "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": 492078771, "size_in_bytes": 617492048}, "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}\n@misc{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={xxxx.xxxxx},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\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"], "names_file": null, "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@misc{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={xxxx.xxxxx},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\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"], "names_file": null, "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@misc{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={xxxx.xxxxx},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\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"], "names_file": null, "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@misc{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={xxxx.xxxxx},\n archivePrefix={arXiv},\n primaryClass={cs.CL}\n}", "homepage": "https://github.com/reglab/casehold", "license": "", "features": {"question": {"dtype": "string", "id": null, "_type": "Value"}, "contexts": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "endings": {"feature": {"dtype": "string", "id": null, "_type": "Value"}, "length": -1, "id": null, "_type": "Sequence"}, "label": {"num_classes": 5, "names": ["0", "1", "2", "3", "4"], "names_file": null, "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": 229240778, "num_examples": 45000, "dataset_name": "lex_glue"}, "test": {"name": "test", "num_bytes": 18350872, "num_examples": 3600, "dataset_name": "lex_glue"}, "validation": {"name": "validation", "num_bytes": 19860783, "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": 267452433, "size_in_bytes": 297875136}}
dummy/case_hold/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4f3682aa6afaa4dcf6bd67ae85da39ed3ab246cb3d5919a101a8a93875efac08
3
+ size 4423
dummy/ecthr_a/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab504009719811b60103e12a92edd094c8cbc57e5d1cac87a157168bfbd27d6a
3
+ size 26178
dummy/ecthr_b/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:880939b0980c8d947a5872a8bff63604d39f6bc09ab103fa401aa5b9a58c0fd7
3
+ size 26178
dummy/eurlex/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec357f36f49e325f1584951244a8e120e43a83edf55e20568593611df6f9d558
3
+ size 4579
dummy/ledgar/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:762e089efcd2343836d8e17d23296e0339dd12fa2db5850be1722697980e8bdc
3
+ size 1575
dummy/scotus/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ad14e05bd53279eb2e3ad0c14664dee3ae07c0355f96658519acb5128d48d92c
3
+ size 39222
dummy/unfair_tos/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:289fd5d7946181b0154a10c913664d01135e4691f7c7a38f39effe57b6114777
3
+ size 912
lex_glue.py ADDED
@@ -0,0 +1,672 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 os
20
+ import textwrap
21
+
22
+ import datasets
23
+
24
+
25
+ MAIN_CITATION = """\
26
+ @article{chalkidis-etal-2021-lexglue,
27
+ title={{LexGLUE}: A Benchmark Dataset for Legal Language Understanding in English},
28
+ author={Chalkidis, Ilias and
29
+ Jana, Abhik and
30
+ Hartung, Dirk and
31
+ Bommarito, Michael and
32
+ Androutsopoulos, Ion and
33
+ Katz, Daniel Martin and
34
+ Aletras, Nikolaos},
35
+ year={2021},
36
+ eprint={2110.00976},
37
+ archivePrefix={arXiv},
38
+ primaryClass={cs.CL},
39
+ note = {arXiv: 2110.00976},
40
+ }"""
41
+
42
+ _DESCRIPTION = """\
43
+ Legal General Language Understanding Evaluation (LexGLUE) benchmark is
44
+ a collection of datasets for evaluating model performance across a diverse set of legal NLU tasks
45
+ """
46
+
47
+ ECTHR_ARTICLES = ["2", "3", "5", "6", "8", "9", "10", "11", "14", "P1-1"]
48
+
49
+ EUROVOC_CONCEPTS = [
50
+ "100163",
51
+ "100164",
52
+ "100165",
53
+ "100166",
54
+ "100167",
55
+ "100168",
56
+ "100169",
57
+ "100170",
58
+ "100171",
59
+ "100172",
60
+ "100173",
61
+ "100174",
62
+ "100175",
63
+ "100176",
64
+ "100177",
65
+ "100178",
66
+ "100179",
67
+ "100180",
68
+ "100181",
69
+ "100182",
70
+ "100183",
71
+ "100184",
72
+ "100185",
73
+ "100186",
74
+ "100187",
75
+ "100188",
76
+ "100189",
77
+ "100190",
78
+ "100191",
79
+ "100192",
80
+ "100193",
81
+ "100194",
82
+ "100195",
83
+ "100196",
84
+ "100197",
85
+ "100198",
86
+ "100199",
87
+ "100200",
88
+ "100201",
89
+ "100202",
90
+ "100203",
91
+ "100204",
92
+ "100205",
93
+ "100206",
94
+ "100207",
95
+ "100208",
96
+ "100209",
97
+ "100210",
98
+ "100211",
99
+ "100212",
100
+ "100213",
101
+ "100214",
102
+ "100215",
103
+ "100216",
104
+ "100217",
105
+ "100218",
106
+ "100219",
107
+ "100220",
108
+ "100221",
109
+ "100222",
110
+ "100223",
111
+ "100224",
112
+ "100225",
113
+ "100226",
114
+ "100227",
115
+ "100228",
116
+ "100229",
117
+ "100230",
118
+ "100231",
119
+ "100232",
120
+ "100233",
121
+ "100234",
122
+ "100235",
123
+ "100236",
124
+ "100237",
125
+ "100238",
126
+ "100239",
127
+ "100240",
128
+ "100241",
129
+ "100242",
130
+ "100243",
131
+ "100244",
132
+ "100245",
133
+ "100246",
134
+ "100247",
135
+ "100248",
136
+ "100249",
137
+ "100250",
138
+ "100251",
139
+ "100252",
140
+ "100253",
141
+ "100254",
142
+ "100255",
143
+ "100256",
144
+ "100257",
145
+ "100258",
146
+ "100259",
147
+ "100260",
148
+ "100261",
149
+ "100262",
150
+ "100263",
151
+ "100264",
152
+ "100265",
153
+ "100266",
154
+ "100267",
155
+ "100268",
156
+ "100269",
157
+ "100270",
158
+ "100271",
159
+ "100272",
160
+ "100273",
161
+ "100274",
162
+ "100275",
163
+ "100276",
164
+ "100277",
165
+ "100278",
166
+ "100279",
167
+ "100280",
168
+ "100281",
169
+ "100282",
170
+ "100283",
171
+ "100284",
172
+ "100285",
173
+ "100286",
174
+ "100287",
175
+ "100288",
176
+ "100289",
177
+ ]
178
+
179
+ LEDGAR_CATEGORIES = [
180
+ "Adjustments",
181
+ "Agreements",
182
+ "Amendments",
183
+ "Anti-Corruption Laws",
184
+ "Applicable Laws",
185
+ "Approvals",
186
+ "Arbitration",
187
+ "Assignments",
188
+ "Assigns",
189
+ "Authority",
190
+ "Authorizations",
191
+ "Base Salary",
192
+ "Benefits",
193
+ "Binding Effects",
194
+ "Books",
195
+ "Brokers",
196
+ "Capitalization",
197
+ "Change In Control",
198
+ "Closings",
199
+ "Compliance With Laws",
200
+ "Confidentiality",
201
+ "Consent To Jurisdiction",
202
+ "Consents",
203
+ "Construction",
204
+ "Cooperation",
205
+ "Costs",
206
+ "Counterparts",
207
+ "Death",
208
+ "Defined Terms",
209
+ "Definitions",
210
+ "Disability",
211
+ "Disclosures",
212
+ "Duties",
213
+ "Effective Dates",
214
+ "Effectiveness",
215
+ "Employment",
216
+ "Enforceability",
217
+ "Enforcements",
218
+ "Entire Agreements",
219
+ "Erisa",
220
+ "Existence",
221
+ "Expenses",
222
+ "Fees",
223
+ "Financial Statements",
224
+ "Forfeitures",
225
+ "Further Assurances",
226
+ "General",
227
+ "Governing Laws",
228
+ "Headings",
229
+ "Indemnifications",
230
+ "Indemnity",
231
+ "Insurances",
232
+ "Integration",
233
+ "Intellectual Property",
234
+ "Interests",
235
+ "Interpretations",
236
+ "Jurisdictions",
237
+ "Liens",
238
+ "Litigations",
239
+ "Miscellaneous",
240
+ "Modifications",
241
+ "No Conflicts",
242
+ "No Defaults",
243
+ "No Waivers",
244
+ "Non-Disparagement",
245
+ "Notices",
246
+ "Organizations",
247
+ "Participations",
248
+ "Payments",
249
+ "Positions",
250
+ "Powers",
251
+ "Publicity",
252
+ "Qualifications",
253
+ "Records",
254
+ "Releases",
255
+ "Remedies",
256
+ "Representations",
257
+ "Sales",
258
+ "Sanctions",
259
+ "Severability",
260
+ "Solvency",
261
+ "Specific Performance",
262
+ "Submission To Jurisdiction",
263
+ "Subsidiaries",
264
+ "Successors",
265
+ "Survival",
266
+ "Tax Withholdings",
267
+ "Taxes",
268
+ "Terminations",
269
+ "Terms",
270
+ "Titles",
271
+ "Transactions With Affiliates",
272
+ "Use Of Proceeds",
273
+ "Vacations",
274
+ "Venues",
275
+ "Vesting",
276
+ "Waiver Of Jury Trials",
277
+ "Waivers",
278
+ "Warranties",
279
+ "Withholdings",
280
+ ]
281
+
282
+ SCDB_ISSUE_AREAS = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13"]
283
+
284
+ UNFAIR_CATEGORIES = [
285
+ "Limitation of liability",
286
+ "Unilateral termination",
287
+ "Unilateral change",
288
+ "Content removal",
289
+ "Contract by using",
290
+ "Choice of law",
291
+ "Jurisdiction",
292
+ "Arbitration",
293
+ ]
294
+
295
+ CASEHOLD_LABELS = ["0", "1", "2", "3", "4"]
296
+
297
+
298
+ class LexGlueConfig(datasets.BuilderConfig):
299
+ """BuilderConfig for LexGLUE."""
300
+
301
+ def __init__(
302
+ self,
303
+ text_column,
304
+ label_column,
305
+ url,
306
+ data_url,
307
+ data_file,
308
+ citation,
309
+ label_classes=None,
310
+ multi_label=None,
311
+ dev_column="dev",
312
+ **kwargs,
313
+ ):
314
+ """BuilderConfig for LexGLUE.
315
+
316
+ Args:
317
+ text_column: ``string`, name of the column in the jsonl file corresponding
318
+ to the text
319
+ label_column: `string`, name of the column in the jsonl file corresponding
320
+ to the label
321
+ url: `string`, url for the original project
322
+ data_url: `string`, url to download the zip file from
323
+ data_file: `string`, filename for data set
324
+ citation: `string`, citation for the data set
325
+ url: `string`, url for information about the data set
326
+ label_classes: `list[string]`, the list of classes if the label is
327
+ categorical. If not provided, then the label will be of type
328
+ `datasets.Value('float32')`.
329
+ multi_label: `boolean`, True if the task is multi-label
330
+ dev_column: `string`, name for the development subset
331
+ **kwargs: keyword arguments forwarded to super.
332
+ """
333
+ super(LexGlueConfig, self).__init__(version=datasets.Version("1.0.0", ""), **kwargs)
334
+ self.text_column = text_column
335
+ self.label_column = label_column
336
+ self.label_classes = label_classes
337
+ self.multi_label = multi_label
338
+ self.dev_column = dev_column
339
+ self.url = url
340
+ self.data_url = data_url
341
+ self.data_file = data_file
342
+ self.citation = citation
343
+
344
+
345
+ class LexGLUE(datasets.GeneratorBasedBuilder):
346
+ """LexGLUE: A Benchmark Dataset for Legal Language Understanding in English. Version 1.0"""
347
+
348
+ BUILDER_CONFIGS = [
349
+ LexGlueConfig(
350
+ name="ecthr_a",
351
+ description=textwrap.dedent(
352
+ """\
353
+ The European Court of Human Rights (ECtHR) hears allegations that a state has
354
+ breached human rights provisions of the European Convention of Human Rights (ECHR).
355
+ For each case, the dataset provides a list of factual paragraphs (facts) from the case description.
356
+ Each case is mapped to articles of the ECHR that were violated (if any)."""
357
+ ),
358
+ text_column="facts",
359
+ label_column="violated_articles",
360
+ label_classes=ECTHR_ARTICLES,
361
+ multi_label=True,
362
+ dev_column="dev",
363
+ data_url="https://zenodo.org/record/5532997/files/ecthr.tar.gz",
364
+ data_file="ecthr.jsonl",
365
+ url="https://archive.org/details/ECtHR-NAACL2021",
366
+ citation=textwrap.dedent(
367
+ """\
368
+ @inproceedings{chalkidis-etal-2021-paragraph,
369
+ title = "Paragraph-level Rationale Extraction through Regularization: A case study on {E}uropean Court of Human Rights Cases",
370
+ author = "Chalkidis, Ilias and
371
+ Fergadiotis, Manos and
372
+ Tsarapatsanis, Dimitrios and
373
+ Aletras, Nikolaos and
374
+ Androutsopoulos, Ion and
375
+ Malakasiotis, Prodromos",
376
+ booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
377
+ month = jun,
378
+ year = "2021",
379
+ address = "Online",
380
+ publisher = "Association for Computational Linguistics",
381
+ url = "https://aclanthology.org/2021.naacl-main.22",
382
+ doi = "10.18653/v1/2021.naacl-main.22",
383
+ pages = "226--241",
384
+ }
385
+ }"""
386
+ ),
387
+ ),
388
+ LexGlueConfig(
389
+ name="ecthr_b",
390
+ description=textwrap.dedent(
391
+ """\
392
+ The European Court of Human Rights (ECtHR) hears allegations that a state has
393
+ breached human rights provisions of the European Convention of Human Rights (ECHR).
394
+ For each case, the dataset provides a list of factual paragraphs (facts) from the case description.
395
+ Each case is mapped to articles of ECHR that were allegedly violated (considered by the court)."""
396
+ ),
397
+ text_column="facts",
398
+ label_column="allegedly_violated_articles",
399
+ label_classes=ECTHR_ARTICLES,
400
+ multi_label=True,
401
+ dev_column="dev",
402
+ url="https://archive.org/details/ECtHR-NAACL2021",
403
+ data_url="https://zenodo.org/record/5532997/files/ecthr.tar.gz",
404
+ data_file="ecthr.jsonl",
405
+ citation=textwrap.dedent(
406
+ """\
407
+ @inproceedings{chalkidis-etal-2021-paragraph,
408
+ title = "Paragraph-level Rationale Extraction through Regularization: A case study on {E}uropean Court of Human Rights Cases",
409
+ author = "Chalkidis, Ilias
410
+ and Fergadiotis, Manos
411
+ and Tsarapatsanis, Dimitrios
412
+ and Aletras, Nikolaos
413
+ and Androutsopoulos, Ion
414
+ and Malakasiotis, Prodromos",
415
+ booktitle = "Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies",
416
+ year = "2021",
417
+ address = "Online",
418
+ url = "https://aclanthology.org/2021.naacl-main.22",
419
+ }
420
+ }"""
421
+ ),
422
+ ),
423
+ LexGlueConfig(
424
+ name="eurlex",
425
+ description=textwrap.dedent(
426
+ """\
427
+ European Union (EU) legislation is published in EUR-Lex portal.
428
+ All EU laws are annotated by EU's Publications Office with multiple concepts from the EuroVoc thesaurus,
429
+ a multilingual thesaurus maintained by the Publications Office.
430
+ The current version of EuroVoc contains more than 7k concepts referring to various activities
431
+ of the EU and its Member States (e.g., economics, health-care, trade).
432
+ Given a document, the task is to predict its EuroVoc labels (concepts)."""
433
+ ),
434
+ text_column="text",
435
+ label_column="labels",
436
+ label_classes=EUROVOC_CONCEPTS,
437
+ multi_label=True,
438
+ dev_column="dev",
439
+ url="https://zenodo.org/record/5363165#.YVJOAi8RqaA",
440
+ data_url="https://zenodo.org/record/5532997/files/eurlex.tar.gz",
441
+ data_file="eurlex.jsonl",
442
+ citation=textwrap.dedent(
443
+ """\
444
+ @inproceedings{chalkidis-etal-2021-multieurlex,
445
+ author = {Chalkidis, Ilias and
446
+ Fergadiotis, Manos and
447
+ Androutsopoulos, Ion},
448
+ title = {MultiEURLEX -- A multi-lingual and multi-label legal document
449
+ classification dataset for zero-shot cross-lingual transfer},
450
+ booktitle = {Proceedings of the 2021 Conference on Empirical Methods
451
+ in Natural Language Processing},
452
+ year = {2021},
453
+ location = {Punta Cana, Dominican Republic},
454
+ }
455
+ }"""
456
+ ),
457
+ ),
458
+ LexGlueConfig(
459
+ name="scotus",
460
+ description=textwrap.dedent(
461
+ """\
462
+ The US Supreme Court (SCOTUS) is the highest federal court in the United States of America
463
+ and generally hears only the most controversial or otherwise complex cases which have not
464
+ been sufficiently well solved by lower courts. This is a single-label multi-class classification
465
+ task, where given a document (court opinion), the task is to predict the relevant issue areas.
466
+ The 14 issue areas cluster 278 issues whose focus is on the subject matter of the controversy (dispute)."""
467
+ ),
468
+ text_column="text",
469
+ label_column="issueArea",
470
+ label_classes=SCDB_ISSUE_AREAS,
471
+ multi_label=False,
472
+ dev_column="dev",
473
+ url="http://scdb.wustl.edu/data.php",
474
+ data_url="https://zenodo.org/record/5532997/files/scotus.tar.gz",
475
+ data_file="scotus.jsonl",
476
+ citation=textwrap.dedent(
477
+ """\
478
+ @misc{spaeth2020,
479
+ author = {Harold J. Spaeth and Lee Epstein and Andrew D. Martin, Jeffrey A. Segal
480
+ and Theodore J. Ruger and Sara C. Benesh},
481
+ year = {2020},
482
+ title ={{Supreme Court Database, Version 2020 Release 01}},
483
+ url= {http://Supremecourtdatabase.org},
484
+ howpublished={Washington University Law}
485
+ }"""
486
+ ),
487
+ ),
488
+ LexGlueConfig(
489
+ name="ledgar",
490
+ description=textwrap.dedent(
491
+ """\
492
+ LEDGAR dataset aims contract provision (paragraph) classification.
493
+ The contract provisions come from contracts obtained from the US Securities and Exchange Commission (SEC)
494
+ filings, which are publicly available from EDGAR. Each label represents the single main topic
495
+ (theme) of the corresponding contract provision."""
496
+ ),
497
+ text_column="text",
498
+ label_column="clause_type",
499
+ label_classes=LEDGAR_CATEGORIES,
500
+ multi_label=False,
501
+ dev_column="dev",
502
+ url="https://metatext.io/datasets/ledgar",
503
+ data_url="https://zenodo.org/record/5532997/files/ledgar.tar.gz",
504
+ data_file="ledgar.jsonl",
505
+ citation=textwrap.dedent(
506
+ """\
507
+ @inproceedings{tuggener-etal-2020-ledgar,
508
+ title = "{LEDGAR}: A Large-Scale Multi-label Corpus for Text Classification of Legal Provisions in Contracts",
509
+ author = {Tuggener, Don and
510
+ von D{\"a}niken, Pius and
511
+ Peetz, Thomas and
512
+ Cieliebak, Mark},
513
+ booktitle = "Proceedings of the 12th Language Resources and Evaluation Conference",
514
+ year = "2020",
515
+ address = "Marseille, France",
516
+ url = "https://aclanthology.org/2020.lrec-1.155",
517
+ }
518
+ }"""
519
+ ),
520
+ ),
521
+ LexGlueConfig(
522
+ name="unfair_tos",
523
+ description=textwrap.dedent(
524
+ """\
525
+ The UNFAIR-ToS dataset contains 50 Terms of Service (ToS) from on-line platforms (e.g., YouTube,
526
+ Ebay, Facebook, etc.). The dataset has been annotated on the sentence-level with 8 types of
527
+ unfair contractual terms (sentences), meaning terms that potentially violate user rights
528
+ according to the European consumer law."""
529
+ ),
530
+ text_column="text",
531
+ label_column="labels",
532
+ label_classes=UNFAIR_CATEGORIES,
533
+ multi_label=True,
534
+ dev_column="val",
535
+ url="http://claudette.eui.eu",
536
+ data_url="https://zenodo.org/record/5532997/files/unfair_tos.tar.gz",
537
+ data_file="unfair_tos.jsonl",
538
+ citation=textwrap.dedent(
539
+ """\
540
+ @article{lippi-etal-2019-claudette,
541
+ title = "{CLAUDETTE}: an automated detector of potentially unfair clauses in online terms of service",
542
+ author = {Lippi, Marco
543
+ and Pałka, Przemysław
544
+ and Contissa, Giuseppe
545
+ and Lagioia, Francesca
546
+ and Micklitz, Hans-Wolfgang
547
+ and Sartor, Giovanni
548
+ and Torroni, Paolo},
549
+ journal = "Artificial Intelligence and Law",
550
+ year = "2019",
551
+ publisher = "Springer",
552
+ url = "https://doi.org/10.1007/s10506-019-09243-2",
553
+ pages = "117--139",
554
+ }"""
555
+ ),
556
+ ),
557
+ LexGlueConfig(
558
+ name="case_hold",
559
+ description=textwrap.dedent(
560
+ """\
561
+ The CaseHOLD (Case Holdings on Legal Decisions) dataset contains approx. 53k multiple choice
562
+ questions about holdings of US court cases from the Harvard Law Library case law corpus.
563
+ Holdings are short summaries of legal rulings accompany referenced decisions relevant for the present case.
564
+ The input consists of an excerpt (or prompt) from a court decision, containing a reference
565
+ to a particular case, while the holding statement is masked out. The model must identify
566
+ the correct (masked) holding statement from a selection of five choices."""
567
+ ),
568
+ text_column="text",
569
+ label_column="labels",
570
+ dev_column="dev",
571
+ multi_label=False,
572
+ label_classes=CASEHOLD_LABELS,
573
+ url="https://github.com/reglab/casehold",
574
+ data_url="https://zenodo.org/record/5532997/files/casehold.tar.gz",
575
+ data_file="casehold.csv",
576
+ citation=textwrap.dedent(
577
+ """\
578
+ @inproceedings{Zheng2021,
579
+ author = {Lucia Zheng and
580
+ Neel Guha and
581
+ Brandon R. Anderson and
582
+ Peter Henderson and
583
+ Daniel E. Ho},
584
+ title = {When Does Pretraining Help? Assessing Self-Supervised Learning for
585
+ Law and the CaseHOLD Dataset},
586
+ year = {2021},
587
+ booktitle = {International Conference on Artificial Intelligence and Law},
588
+ }"""
589
+ ),
590
+ ),
591
+ ]
592
+
593
+ def _info(self):
594
+ if self.config.name == "case_hold":
595
+ features = {
596
+ "question": datasets.Value("string"),
597
+ "contexts": datasets.features.Sequence(datasets.Value("string")),
598
+ "endings": datasets.features.Sequence(datasets.Value("string")),
599
+ }
600
+ elif "ecthr" in self.config.name:
601
+ features = {"text": datasets.features.Sequence(datasets.Value("string"))}
602
+ else:
603
+ features = {"text": datasets.Value("string")}
604
+ if self.config.multi_label:
605
+ features["labels"] = datasets.features.Sequence(datasets.ClassLabel(names=self.config.label_classes))
606
+ else:
607
+ features["label"] = datasets.ClassLabel(names=self.config.label_classes)
608
+ return datasets.DatasetInfo(
609
+ description=self.config.description,
610
+ features=datasets.Features(features),
611
+ homepage=self.config.url,
612
+ citation=self.config.citation + "\n" + MAIN_CITATION,
613
+ )
614
+
615
+ def _split_generators(self, dl_manager):
616
+ data_dir = dl_manager.download_and_extract(self.config.data_url)
617
+ return [
618
+ datasets.SplitGenerator(
619
+ name=datasets.Split.TRAIN,
620
+ # These kwargs will be passed to _generate_examples
621
+ gen_kwargs={"filepath": os.path.join(data_dir, self.config.data_file), "split": "train"},
622
+ ),
623
+ datasets.SplitGenerator(
624
+ name=datasets.Split.TEST,
625
+ # These kwargs will be passed to _generate_examples
626
+ gen_kwargs={"filepath": os.path.join(data_dir, self.config.data_file), "split": "test"},
627
+ ),
628
+ datasets.SplitGenerator(
629
+ name=datasets.Split.VALIDATION,
630
+ # These kwargs will be passed to _generate_examples
631
+ gen_kwargs={
632
+ "filepath": os.path.join(data_dir, self.config.data_file),
633
+ "split": self.config.dev_column,
634
+ },
635
+ ),
636
+ ]
637
+
638
+ def _generate_examples(self, filepath, split):
639
+ """This function returns the examples in the raw (text) form."""
640
+ if self.config.name == "case_hold":
641
+ if "dummy" in filepath:
642
+ SPLIT_RANGES = {"train": (1, 3), "dev": (3, 5), "test": (5, 7)}
643
+ else:
644
+ SPLIT_RANGES = {"train": (1, 45001), "dev": (45001, 48901), "test": (48901, 52501)}
645
+ with open(filepath, "r", encoding="utf-8") as f:
646
+ for id_, row in enumerate(list(csv.reader(f))[SPLIT_RANGES[split][0] : SPLIT_RANGES[split][1]]):
647
+ yield id_, {
648
+ "context": row[1],
649
+ "holdings": [row[2], row[3], row[4], row[5], row[6]],
650
+ "label": str(row[12]),
651
+ }
652
+ elif self.config.multi_label:
653
+ with open(filepath, "r", encoding="utf-8") as f:
654
+ for id_, row in enumerate(f):
655
+ data = json.loads(row)
656
+ labels = sorted(
657
+ list(set(data[self.config.label_column]).intersection(set(self.config.label_classes)))
658
+ )
659
+ if data["data_type"] == split:
660
+ yield id_, {
661
+ "text": data[self.config.text_column],
662
+ "labels": labels,
663
+ }
664
+ else:
665
+ with open(filepath, "r", encoding="utf-8") as f:
666
+ for id_, row in enumerate(f):
667
+ data = json.loads(row)
668
+ if data["data_type"] == split:
669
+ yield id_, {
670
+ "text": data[self.config.text_column],
671
+ "label": data[self.config.label_column],
672
+ }