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

Update files from the datasets library (from 1.6.0)

Browse files

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

Files changed (5) hide show
  1. .gitattributes +27 -0
  2. README.md +252 -0
  3. cuad.py +131 -0
  4. dataset_infos.json +1 -0
  5. dummy/1.0.0/dummy_data.zip +3 -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,252 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ annotations_creators:
3
+ - expert-generated
4
+ language_creators:
5
+ - found
6
+ languages:
7
+ - en
8
+ licenses:
9
+ - cc-by-4-0
10
+ multilinguality:
11
+ - monolingual
12
+ size_categories:
13
+ - 10K<n<100K
14
+ source_datasets:
15
+ - original
16
+ task_categories:
17
+ - question-answering
18
+ task_ids:
19
+ - closed-domain-qa
20
+ - extractive-qa
21
+ ---
22
+
23
+ # Dataset Card for CUAD
24
+
25
+ ## Table of Contents
26
+ - [Dataset Card Creation Guide](#dataset-card-creation-guide)
27
+ - [Table of Contents](#table-of-contents)
28
+ - [Dataset Description](#dataset-description)
29
+ - [Dataset Summary](#dataset-summary)
30
+ - [Supported Tasks and Leaderboards](#supported-tasks-and-leaderboards)
31
+ - [Languages](#languages)
32
+ - [Dataset Structure](#dataset-structure)
33
+ - [Data Instances](#data-instances)
34
+ - [Data Fields](#data-fields)
35
+ - [Data Splits](#data-splits)
36
+ - [Dataset Creation](#dataset-creation)
37
+ - [Curation Rationale](#curation-rationale)
38
+ - [Source Data](#source-data)
39
+ - [Initial Data Collection and Normalization](#initial-data-collection-and-normalization)
40
+ - [Who are the source language producers?](#who-are-the-source-language-producers)
41
+ - [Annotations](#annotations)
42
+ - [Annotation process](#annotation-process)
43
+ - [Who are the annotators?](#who-are-the-annotators)
44
+ - [Personal and Sensitive Information](#personal-and-sensitive-information)
45
+ - [Considerations for Using the Data](#considerations-for-using-the-data)
46
+ - [Social Impact of Dataset](#social-impact-of-dataset)
47
+ - [Discussion of Biases](#discussion-of-biases)
48
+ - [Other Known Limitations](#other-known-limitations)
49
+ - [Additional Information](#additional-information)
50
+ - [Dataset Curators](#dataset-curators)
51
+ - [Licensing Information](#licensing-information)
52
+ - [Citation Information](#citation-information)
53
+ - [Contributions](#contributions)
54
+
55
+ ## Dataset Description
56
+
57
+ - **Homepage:** [Contract Understanding Atticus Dataset](https://www.atticusprojectai.org/cuad)
58
+ - **Repository:** [Contract Understanding Atticus Dataset](https://github.com/TheAtticusProject/cuad/)
59
+ - **Paper:** [CUAD: An Expert-Annotated NLP Dataset for Legal Contract Review](https://arxiv.org/abs/2103.06268)
60
+ - **Point of Contact:** [info@atticusprojectai.org](Atticus Project Team)
61
+
62
+ ### Dataset Summary
63
+
64
+ Contract Understanding Atticus Dataset (CUAD) v1 is a corpus of more than 13,000 labels in 510 commercial legal contracts that have been manually labeled to identify 41 categories of important clauses that lawyers look for when reviewing contracts in connection with corporate transactions.
65
+
66
+ CUAD is curated and maintained by The Atticus Project, Inc. to support NLP research and development in legal contract review. Analysis of CUAD can be found at https://arxiv.org/abs/2103.06268. Code for replicating the results and the trained model can be found at https://github.com/TheAtticusProject/cuad.
67
+
68
+ ### Supported Tasks and Leaderboards
69
+
70
+ [More Information Needed]
71
+
72
+ ### Languages
73
+
74
+ The dataset contains samples in English only.
75
+
76
+ ## Dataset Structure
77
+
78
+ ### Data Instances
79
+
80
+ An example of 'train' looks as follows.
81
+ ```
82
+ This example was too long and was cropped:
83
+
84
+ {
85
+ "answers": {
86
+ "answer_start": [44],
87
+ "text": ['DISTRIBUTOR AGREEMENT']
88
+ },
89
+ "context": 'EXHIBIT 10.6\n\n DISTRIBUTOR AGREEMENT\n\n THIS DISTRIBUTOR AGREEMENT (the "Agreement") is made by and between Electric City Corp., a Delaware corporation ("Company") and Electric City of Illinois LLC ("Distributor") this 7th day of September, 1999...',
90
+ "id": "LIMEENERGYCO_09_09_1999-EX-10-DISTRIBUTOR AGREEMENT__Document Name_0",
91
+ "question": "Highlight the parts (if any) of this contract related to "Document Name" that should be reviewed by a lawyer. Details: The name of the contract",
92
+ "title": "LIMEENERGYCO_09_09_1999-EX-10-DISTRIBUTOR AGREEMENT"
93
+ }
94
+ ```
95
+
96
+ ### Data Fields
97
+
98
+ - `id`: a `string` feature.
99
+ - `title`: a `string` feature.
100
+ - `context`: a `string` feature.
101
+ - `question`: a `string` feature.
102
+ - `answers`: a dictionary feature containing:
103
+ - `text`: a `string` feature.
104
+ - `answer_start`: a `int32` feature.
105
+
106
+ ### Data Splits
107
+
108
+ This dataset is split into train/test set. Number of samples in each set is given below:
109
+
110
+ | | Train | Test |
111
+ | ----- | ------ | ---- |
112
+ | CUAD | 22450 | 4182 |
113
+
114
+ ## Dataset Creation
115
+
116
+ ### Curation Rationale
117
+
118
+ A highly valuable specialized task without a public large-scale dataset is contract review, which costs humans substantial time, money, and attention. Many law firms spend approximately 50% of their time reviewing contracts (CEB, 2017). Due to the specialized training necessary to understand and interpret contracts, the billing rates for lawyers at large law firms are typically around $500-$900 per hour in the US. As a result, many transactions cost companies hundreds of thousands of dollars just so that lawyers can verify that there are no problematic obligations or requirements included in the contracts. Contract review can be a source of drudgery and, in comparison to other legal tasks, is widely considered to be especially boring.
119
+
120
+ Contract review costs also affect consumers. Since contract review costs are so prohibitive, contract review is not often performed outside corporate transactions. Small companies and individuals consequently often sign contracts without even reading them, which can result in predatory behavior that harms consumers. Automating contract review by openly releasing high-quality data and fine-tuned models can increase access to legal support for small businesses and individuals, so that legal support is not exclusively available to wealthy companies.
121
+
122
+ To reduce the disparate societal costs of contract review, and to study how well NLP models generalize to specialized domains, the authors introduced a new large-scale dataset for contract review. As part of The Atticus Project, a non-profit organization of legal experts, CUAD is introduced, the Contract Understanding Atticus Dataset. This dataset was created with a year-long effort pushed forward by dozens of law student annotators, lawyers, and machine learning researchers. The dataset includes more than 500 contracts and more than 13,000 expert annotations that span 41 label categories. For each of 41 different labels, models must learn to highlight the portions of a contract most salient to that label. This makes the task a matter of finding needles in a haystack.
123
+
124
+ ### Source Data
125
+
126
+ #### Initial Data Collection and Normalization
127
+
128
+ The CUAD includes commercial contracts selected from 25 different types of contracts based on the contract names as shown below. Within each type, the creators randomly selected contracts based on the names of the filing companies across the alphabet.
129
+
130
+ Type of Contracts: # of Docs
131
+
132
+ Affiliate Agreement: 10
133
+ Agency Agreement: 13
134
+ Collaboration/Cooperation Agreement: 26
135
+ Co-Branding Agreement: 22
136
+ Consulting Agreement: 11
137
+ Development Agreement: 29
138
+ Distributor Agreement: 32
139
+ Endorsement Agreement: 24
140
+ Franchise Agreement: 15
141
+ Hosting Agreement: 20
142
+ IP Agreement: 17
143
+ Joint Venture Agreemen: 23
144
+ License Agreement: 33
145
+ Maintenance Agreement: 34
146
+ Manufacturing Agreement: 17
147
+ Marketing Agreement: 17
148
+ Non-Compete/No-Solicit/Non-Disparagement Agreement: 3
149
+ Outsourcing Agreement: 18
150
+ Promotion Agreement: 12
151
+ Reseller Agreement: 12
152
+ Service Agreement: 28
153
+ Sponsorship Agreement: 31
154
+ Supply Agreement: 18
155
+ Strategic Alliance Agreement: 32
156
+ Transportation Agreement: 13
157
+ TOTAL: 510
158
+
159
+ #### Who are the source language producers?
160
+
161
+ The contracts were sourced from EDGAR, the Electronic Data Gathering, Analysis, and Retrieval system used at the U.S. Securities and Exchange Commission (SEC). Publicly traded companies in the United States are required to file certain contracts under the SEC rules. Access to these contracts is available to the public for free at https://www.sec.gov/edgar. Please read the Datasheet at https://www.atticusprojectai.org/ for information on the intended use and limitations of the CUAD.
162
+
163
+ ### Annotations
164
+
165
+ #### Annotation process
166
+
167
+ The labeling process included multiple steps to ensure accuracy:
168
+ 1. Law Student Training: law students attended training sessions on each of the categories that included a summary, video instructions by experienced attorneys, multiple quizzes and workshops. Students were then required to label sample contracts in eBrevia, an online contract review tool. The initial training took approximately 70-100 hours.
169
+ 2. Law Student Label: law students conducted manual contract review and labeling in eBrevia.
170
+ 3. Key Word Search: law students conducted keyword search in eBrevia to capture additional categories that have been missed during the “Student Label” step.
171
+ 4. Category-by-Category Report Review: law students exported the labeled clauses into reports, review each clause category-by-category and highlight clauses that they believe are mislabeled.
172
+ 5. Attorney Review: experienced attorneys reviewed the category-by-category report with students comments, provided comments and addressed student questions. When applicable, attorneys discussed such results with the students and reached consensus. Students made changes in eBrevia accordingly.
173
+ 6. eBrevia Extras Review. Attorneys and students used eBrevia to generate a list of “extras”, which are clauses that eBrevia AI tool identified as responsive to a category but not labeled by human annotators. Attorneys and students reviewed all of the “extras” and added the correct ones. The process is repeated until all or substantially all of the “extras” are incorrect labels.
174
+ 7. Final Report: The final report was exported into a CSV file. Volunteers manually added the “Yes/No” answer column to categories that do not contain an answer.
175
+
176
+ #### Who are the annotators?
177
+
178
+ Answered in above section.
179
+
180
+ ### Personal and Sensitive Information
181
+
182
+ Some clauses in the files are redacted because the party submitting these contracts redacted them to protect confidentiality. Such redaction may show up as asterisks (\*\*\*) or underscores (\_\_\_) or blank spaces. The dataset and the answers reflect such redactions. For example, the answer for “January \_\_ 2020” would be “1/[]/2020”).
183
+
184
+ For any categories that require an answer of “Yes/No”, annotators include full sentences as text context in a contract. To maintain consistency and minimize inter-annotator disagreement, annotators select text for the full sentence, under the instruction of “from period to period”.
185
+
186
+ For the other categories, annotators selected segments of the text in the contract that are responsive to each such category. One category in a contract may include multiple labels. For example, “Parties” may include 4-10 separate text strings that are not continuous in a contract. The answer is presented in the unified format separated by semicolons of “Party A Inc. (“Party A”); Party B Corp. (“Party B”)”.
187
+
188
+ Some sentences in the files include confidential legends that are not part of the contracts. An example of such confidential legend is as follows:
189
+
190
+ THIS EXHIBIT HAS BEEN REDACTED AND IS THE SUBJECT OF A CONFIDENTIAL TREATMENT REQUEST. REDACTED MATERIAL IS MARKED WITH [* * *] AND HAS BEEN FILED SEPARATELY WITH THE SECURITIES AND EXCHANGE COMMISSION.
191
+
192
+ Some sentences in the files contain irrelevant information such as footers or page numbers. Some sentences may not be relevant to the corresponding category. Some sentences may correspond to a different category. Because many legal clauses are very long and contain various sub-parts, sometimes only a sub-part of a sentence is responsive to a category.
193
+
194
+ To address the foregoing limitations, annotators manually deleted the portion that is not responsive, replacing it with the symbol "<omitted>" to indicate that the two text segments do not appear immediately next to each other in the contracts. For example, if a “Termination for Convenience” clause starts with “Each Party may terminate this Agreement if” followed by three subparts “(a), (b) and (c)”, but only subpart (c) is responsive to this category, the authors manually deleted subparts (a) and (b) and replaced them with the symbol "<omitted>”. Another example is for “Effective Date”, the contract includes a sentence “This Agreement is effective as of the date written above” that appears after the date “January 1, 2010”. The annotation is as follows: “January 1, 2010 <omitted> This Agreement is effective as of the date written above.”
195
+
196
+ Because the contracts were converted from PDF into TXT files, the converted TXT files may not stay true to the format of the original PDF files. For example, some contracts contain inconsistent spacing between words, sentences and paragraphs. Table format is not maintained in the TXT files.
197
+
198
+ ## Considerations for Using the Data
199
+
200
+ ### Social Impact of Dataset
201
+
202
+ [More Information Needed]
203
+
204
+ ### Discussion of Biases
205
+
206
+ [More Information Needed]
207
+
208
+ ### Other Known Limitations
209
+
210
+ [More Information Needed]
211
+
212
+ ## Additional Information
213
+
214
+ ### Dataset Curators
215
+
216
+ Attorney Advisors
217
+ Wei Chen, John Brockland, Kevin Chen, Jacky Fink, Spencer P. Goodson, Justin Haan, Alex Haskell, Kari Krusmark, Jenny Lin, Jonas Marson, Benjamin Petersen, Alexander Kwonji Rosenberg, William R. Sawyers, Brittany Schmeltz, Max Scott, Zhu Zhu
218
+
219
+ Law Student Leaders
220
+ John Batoha, Daisy Beckner, Lovina Consunji, Gina Diaz, Chris Gronseth, Calvin Hannagan, Joseph Kroon, Sheetal Sharma Saran
221
+
222
+ Law Student Contributors
223
+ Scott Aronin, Bryan Burgoon, Jigar Desai, Imani Haynes, Jeongsoo Kim, Margaret Lynch, Allison Melville, Felix Mendez-Burgos, Nicole Mirkazemi, David Myers, Emily Rissberger, Behrang Seraj, Sarahginy Valcin
224
+
225
+ Technical Advisors & Contributors
226
+ Dan Hendrycks, Collin Burns, Spencer Ball, Anya Chen
227
+
228
+ ### Licensing Information
229
+
230
+ CUAD is licensed under the Creative Commons Attribution 4.0 (CC BY 4.0) license and free to the public for commercial and non-commercial use.
231
+
232
+ The creators make no representations or warranties regarding the license status of the underlying contracts, which are publicly available and downloadable from EDGAR.
233
+ Privacy Policy & Disclaimers
234
+
235
+ The categories or the contracts included in the dataset are not comprehensive or representative. The authors encourage the public to help improve them by sending them your comments and suggestions to info@atticusprojectai.org. Comments and suggestions will be reviewed by The Atticus Project at its discretion and will be included in future versions of Atticus categories once approved.
236
+
237
+ The use of CUAD is subject to their privacy policy https://www.atticusprojectai.org/privacy-policy and disclaimer https://www.atticusprojectai.org/disclaimer.
238
+
239
+ ### Citation Information
240
+
241
+ ```
242
+ @article{hendrycks2021cuad,
243
+ title={CUAD: An Expert-Annotated NLP Dataset for Legal Contract Review},
244
+ author={Dan Hendrycks and Collin Burns and Anya Chen and Spencer Ball},
245
+ journal={arXiv preprint arXiv:2103.06268},
246
+ year={2021}
247
+ }
248
+ ```
249
+
250
+ ### Contributions
251
+
252
+ Thanks to [@bhavitvyamalik](https://github.com/bhavitvyamalik) for adding this dataset.
cuad.py ADDED
@@ -0,0 +1,131 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ """CUAD: A dataset for legal contract review curated by the Atticus Project."""
16
+
17
+ from __future__ import absolute_import, division, print_function
18
+
19
+ import json
20
+ import os
21
+
22
+ import datasets
23
+
24
+
25
+ _CITATION = """\
26
+ @article{hendrycks2021cuad,
27
+ title={CUAD: An Expert-Annotated NLP Dataset for Legal Contract Review},
28
+ author={Dan Hendrycks and Collin Burns and Anya Chen and Spencer Ball},
29
+ journal={arXiv preprint arXiv:2103.06268},
30
+ year={2021}
31
+ }
32
+ """
33
+
34
+ _DESCRIPTION = """\
35
+ Contract Understanding Atticus Dataset (CUAD) v1 is a corpus of more than 13,000 labels in 510
36
+ commercial legal contracts that have been manually labeled to identify 41 categories of important
37
+ clauses that lawyers look for when reviewing contracts in connection with corporate transactions.
38
+ """
39
+
40
+ _HOMEPAGE = "https://www.atticusprojectai.org/cuad"
41
+
42
+ _LICENSE = "CUAD is licensed under the Creative Commons Attribution 4.0 (CC BY 4.0) license."
43
+
44
+ _URL = "https://github.com/TheAtticusProject/cuad/raw/main/data.zip"
45
+
46
+
47
+ class CUAD(datasets.GeneratorBasedBuilder):
48
+ """CUAD: A dataset for legal contract review curated by the Atticus Project."""
49
+
50
+ VERSION = "1.0.0"
51
+
52
+ def _info(self):
53
+ features = datasets.Features(
54
+ {
55
+ "id": datasets.Value("string"),
56
+ "title": datasets.Value("string"),
57
+ "context": datasets.Value("string"),
58
+ "question": datasets.Value("string"),
59
+ "answers": datasets.features.Sequence(
60
+ {
61
+ "text": datasets.Value("string"),
62
+ "answer_start": datasets.Value("int32"),
63
+ }
64
+ ),
65
+ }
66
+ )
67
+ return datasets.DatasetInfo(
68
+ # This is the description that will appear on the datasets page.
69
+ description=_DESCRIPTION,
70
+ # This defines the different columns of the dataset and their types
71
+ features=features, # Here we define them above because they are different between the two configurations
72
+ # If there's a common (input, target) tuple from the features,
73
+ # specify them here. They'll be used if as_supervised=True in
74
+ # builder.as_dataset.
75
+ supervised_keys=None,
76
+ # Homepage of the dataset for documentation
77
+ homepage=_HOMEPAGE,
78
+ # License for the dataset if available
79
+ license=_LICENSE,
80
+ # Citation for the dataset
81
+ citation=_CITATION,
82
+ )
83
+
84
+ def _split_generators(self, dl_manager):
85
+ """Returns SplitGenerators."""
86
+
87
+ data_dir = dl_manager.download_and_extract(_URL)
88
+ return [
89
+ datasets.SplitGenerator(
90
+ name=datasets.Split.TRAIN,
91
+ # These kwargs will be passed to _generate_examples
92
+ gen_kwargs={
93
+ "filepath": os.path.join(data_dir, "train_separate_questions.json"),
94
+ "split": "train",
95
+ },
96
+ ),
97
+ datasets.SplitGenerator(
98
+ name=datasets.Split.TEST,
99
+ # These kwargs will be passed to _generate_examples
100
+ gen_kwargs={"filepath": os.path.join(data_dir, "test.json"), "split": "test"},
101
+ ),
102
+ ]
103
+
104
+ def _generate_examples(
105
+ self, filepath, split # method parameters are unpacked from `gen_kwargs` as given in `_split_generators`
106
+ ):
107
+ """ Yields examples as (key, example) tuples. """
108
+
109
+ with open(filepath, encoding="utf-8") as f:
110
+ cuad = json.load(f)
111
+ for example in cuad["data"]:
112
+ title = example.get("title", "").strip()
113
+ for paragraph in example["paragraphs"]:
114
+ context = paragraph["context"].strip()
115
+ for qa in paragraph["qas"]:
116
+ question = qa["question"].strip()
117
+ id_ = qa["id"]
118
+
119
+ answer_starts = [answer["answer_start"] for answer in qa["answers"]]
120
+ answers = [answer["text"].strip() for answer in qa["answers"]]
121
+
122
+ yield id_, {
123
+ "title": title,
124
+ "context": context,
125
+ "question": question,
126
+ "id": id_,
127
+ "answers": {
128
+ "answer_start": answer_starts,
129
+ "text": answers,
130
+ },
131
+ }
dataset_infos.json ADDED
@@ -0,0 +1 @@
 
1
+ {"default": {"description": "Contract Understanding Atticus Dataset (CUAD) v1 is a corpus of more than 13,000 labels in 510\ncommercial legal contracts that have been manually labeled to identify 41 categories of important\nclauses that lawyers look for when reviewing contracts in connection with corporate transactions.\n", "citation": "@article{hendrycks2021cuad,\n title={CUAD: An Expert-Annotated NLP Dataset for Legal Contract Review},\n author={Dan Hendrycks and Collin Burns and Anya Chen and Spencer Ball},\n journal={arXiv preprint arXiv:2103.06268},\n year={2021}\n}\n", "homepage": "https://www.atticusprojectai.org/cuad", "license": "CUAD is licensed under the Creative Commons Attribution 4.0 (CC BY 4.0) license.", "features": {"id": {"dtype": "string", "id": null, "_type": "Value"}, "title": {"dtype": "string", "id": null, "_type": "Value"}, "context": {"dtype": "string", "id": null, "_type": "Value"}, "question": {"dtype": "string", "id": null, "_type": "Value"}, "answers": {"feature": {"text": {"dtype": "string", "id": null, "_type": "Value"}, "answer_start": {"dtype": "int32", "id": null, "_type": "Value"}}, "length": -1, "id": null, "_type": "Sequence"}}, "post_processed": null, "supervised_keys": null, "builder_name": "cuad", "config_name": "default", "version": {"version_str": "1.0.0", "description": null, "major": 1, "minor": 0, "patch": 0}, "splits": {"train": {"name": "train", "num_bytes": 1466037640, "num_examples": 22450, "dataset_name": "cuad"}, "test": {"name": "test", "num_bytes": 198543467, "num_examples": 4182, "dataset_name": "cuad"}}, "download_checksums": {"https://github.com/TheAtticusProject/cuad/raw/main/data.zip": {"num_bytes": 18309308, "checksum": "f8161d18bea4e9c05e78fa6dda61c19c846fb8087ea969c172753bc2f45b999a"}}, "download_size": 18309308, "post_processing_size": null, "dataset_size": 1664581107, "size_in_bytes": 1682890415}}
dummy/1.0.0/dummy_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5bad8b8247ccae4d82644e0e0a9a22bcf02c330171e6107e97023da4fd47b661
3
+ size 52028