joelniklaus commited on
Commit
39ba7aa
1 Parent(s): 5b28bbc

removed borderline legal data originating from pile-of-law

Browse files
Files changed (1) hide show
  1. Multi_Legal_Pile.py +8 -51
Multi_Legal_Pile.py CHANGED
@@ -185,10 +185,6 @@ _PILE_OF_LAW_NAMES = {
185
  "train": ["train.uscode"],
186
  "validation": ["validation.uscode"]
187
  },
188
- "founding_docs": {
189
- "train": ["train.founding_docs"],
190
- "validation": ["validation.founding_docs"]
191
- },
192
  "constitutions": {
193
  "train": ["train.constitutions"],
194
  "validation": ["validation.constitutions"]
@@ -206,7 +202,7 @@ _PILE_OF_LAW_NAMES = {
206
  "validation": ["validation.frcp"]
207
  },
208
  },
209
- "analyses": {
210
  "oig": {
211
  "train": ["train.oig"],
212
  "validation": ["validation.oig"]
@@ -216,51 +212,14 @@ _PILE_OF_LAW_NAMES = {
216
  "validation": ["validation.olcmemos"]
217
  },
218
  },
219
- "conversations": {
220
- "r_legaladvice": {
221
- "train": ["train.r_legaldvice"],
222
- "validation": ["validation.r_legaldvice"]
223
- },
224
- "euro_parl": {
225
- "train": ["train.euro_parl"],
226
- "validation": ["validation.euro_parl"]
227
- },
228
- "un_debates": {
229
- "train": ["train.undebates"],
230
- "validation": ["validation.undebates"]
231
- },
232
- "congressional_hearings": {
233
- "train": ["train.congressional_hearings"],
234
- "validation": ["validation.congressional_hearings"]
235
- },
236
- "scotus_oral_arguments": {
237
- "train": ["train.scotus_oral"],
238
- "validation": ["validation.scotus_oral"]
239
- },
240
- },
241
- "study_materials": {
242
- "bar_exam_outlines": {
243
- "train": [
244
- "train.stanfordbarexamoutlines",
245
- "train.shajnfeldbarexamoutlines",
246
- ],
247
- "validation": [
248
- "validation.stanfordbarexamoutlines",
249
- "validation.shajnfeldbarexamoutlines",
250
- ]
251
- },
252
- "cc_casebooks": {
253
- "train": ["train.cc_casebooks"],
254
- "validation": ["validation.cc_casebooks"]
255
- },
256
- },
257
  }
258
 
259
- _LANGUAGES = ["bg", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "ga",
260
- "hr", "hu", "it", "lt", "lv", "mt", "nl", "pl", "pt", "ro", "sk", "sl", "sv"]
261
 
262
- # the pile-of-law additionally contains "conversations", "analyses", "study_materials"
263
- # TODO maybe include those additional types as well: https://arxiv.org/pdf/2207.00220.pdf appendix E
 
 
 
264
  _TYPES = ["caselaw", "contracts", "legislation", "other"]
265
 
266
  _JURISDICTONS = ["Austria", "Belgium", "Bulgaria", "Croatia", "Czechia", "Denmark", "Estonia", "Finland",
@@ -360,11 +319,9 @@ class MultiLegalPile(datasets.GeneratorBasedBuilder):
360
  for name, train_val_files in _PILE_OF_LAW_NAMES[type].items():
361
  if name == 'canadian_decisions':
362
  info["jurisdiction"] = "Canada"
363
- elif name in ['echr', 'euro_parl']:
364
  info["jurisdiction"] = "EU"
365
- elif name in ['un_debates', 'constitutions',
366
- # these are maybe also mostly from the US
367
- 'r_legaladvice', 'cc_casebooks', 'bar_exam_outlines']:
368
  info["jurisdiction"] = "N/A"
369
  for split in ["train", "validation"]:
370
  for file_name in train_val_files[split]:
 
185
  "train": ["train.uscode"],
186
  "validation": ["validation.uscode"]
187
  },
 
 
 
 
188
  "constitutions": {
189
  "train": ["train.constitutions"],
190
  "validation": ["validation.constitutions"]
 
202
  "validation": ["validation.frcp"]
203
  },
204
  },
205
+ "other": { # analyses
206
  "oig": {
207
  "train": ["train.oig"],
208
  "validation": ["validation.oig"]
 
212
  "validation": ["validation.olcmemos"]
213
  },
214
  },
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
215
  }
216
 
 
 
217
 
218
+
219
+ _LANGUAGES = ["bg", "cs", "da", "de", "el", "en", "es", "et", "fi", "fr", "ga", "hr",
220
+ "hu", "it", "lt", "lv", "mt", "nl", "pl", "pt", "ro", "sk", "sl", "sv"]
221
+
222
+
223
  _TYPES = ["caselaw", "contracts", "legislation", "other"]
224
 
225
  _JURISDICTONS = ["Austria", "Belgium", "Bulgaria", "Croatia", "Czechia", "Denmark", "Estonia", "Finland",
 
319
  for name, train_val_files in _PILE_OF_LAW_NAMES[type].items():
320
  if name == 'canadian_decisions':
321
  info["jurisdiction"] = "Canada"
322
+ elif name in ['echr']:
323
  info["jurisdiction"] = "EU"
324
+ elif name in ['constitutions']:
 
 
325
  info["jurisdiction"] = "N/A"
326
  for split in ["train", "validation"]:
327
  for file_name in train_val_files[split]: