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
 
 
 
d48dbed
 
 
 
ec46bfa
 
 
 
691b86b
 
 
 
657edb5
 
 
 
ae6ec18
 
 
 
49bfde7
 
 
 
0e85b68
 
 
 
3fceec8
 
 
 
5a927d5
 
 
 
879dc98
 
 
 
5b9db96
 
 
a5b6992
11c7d99
9df8fa8
5b9db96
 
 
a5b6992
d63fdeb
a5b6992
 
5b9db96
c0c5511
6037db0
 
 
 
 
d63fdeb
c0c5511
 
 
 
37d4f41
a5b6992
5b9db96
b83a9a1
5b9db96
49f200b
5b9db96
 
 
cc599cd
49f200b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
cc599cd
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
---
language:
- pt
size_categories:
- 10M<n<100M
task_categories:
- text-generation
tags:
- legal
dataset_info:
- config_name: all
  features:
  - name: id
    dtype: int64
  - name: source
    dtype: string
  - name: orig_id
    dtype: int64
  - name: text
    dtype: string
  splits:
  - name: train
    num_bytes: 135151899572
    num_examples: 24194918
  download_size: 71423192838
  dataset_size: 135151899572
- config_name: acordaos_tcu
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 3494790013
    num_examples: 634711
  download_size: 1653039356
  dataset_size: 3494790013
- config_name: datastf
  features:
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  - name: id
    dtype: int64
  splits:
  - name: train
    num_bytes: 3699382656
    num_examples: 737769
  download_size: 1724245648
  dataset_size: 3699382656
- config_name: iudicium_textum
  features:
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  - name: id
    dtype: int64
  splits:
  - name: train
    num_bytes: 896139675
    num_examples: 198387
  download_size: 408025309
  dataset_size: 896139675
- config_name: mlp_pt_BRCAD-5
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 20311710293
    num_examples: 3128292
  download_size: 9735599974
  dataset_size: 20311710293
- config_name: mlp_pt_CJPG
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 63201157801
    num_examples: 14068634
  download_size: 30473107046
  dataset_size: 63201157801
- config_name: mlp_pt_eurlex-caselaw
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 1499601545
    num_examples: 104312
  download_size: 627235870
  dataset_size: 1499601545
- config_name: mlp_pt_eurlex-contracts
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 467200973
    num_examples: 11581
  download_size: 112805426
  dataset_size: 467200973
- config_name: mlp_pt_eurlex-legislation
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 5669271303
    num_examples: 232556
  download_size: 1384571339
  dataset_size: 5669271303
- config_name: mlp_pt_legal-mc4
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 4483889482
    num_examples: 191174
  download_size: 2250422592
  dataset_size: 4483889482
- config_name: parlamento-pt
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 2867291543
    num_examples: 2670846
  download_size: 1319479156
  dataset_size: 2867291543
- config_name: tesemo_v2
  features:
  - name: id
    dtype: int64
  - name: text
    dtype: string
  - name: meta
    struct:
    - name: dedup
      struct:
      - name: exact_norm
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: exact_hash_idx
          dtype: int64
        - name: is_duplicate
          dtype: bool
      - name: minhash
        struct:
        - name: cluster_main_idx
          dtype: int64
        - name: cluster_size
          dtype: int64
        - name: is_duplicate
          dtype: bool
        - name: minhash_idx
          dtype: int64
  splits:
  - name: train
    num_bytes: 29158221995
    num_examples: 2216656
  download_size: 13543440397
  dataset_size: 29158221995
configs:
- config_name: all
  data_files:
  - split: train
    path: all/train-*
- config_name: acordaos_tcu
  data_files:
  - split: train
    path: acordaos_tcu/train-*
- config_name: datastf
  data_files:
  - split: train
    path: datastf/train-*
- config_name: iudicium_textum
  data_files:
  - split: train
    path: iudicium_textum/train-*
- config_name: mlp_pt_BRCAD-5
  data_files:
  - split: train
    path: mlp_pt_BRCAD-5/train-*
- config_name: mlp_pt_CJPG
  data_files:
  - split: train
    path: mlp_pt_CJPG/train-*
- config_name: mlp_pt_eurlex-caselaw
  data_files:
  - split: train
    path: mlp_pt_eurlex-caselaw/train-*
- config_name: mlp_pt_eurlex-contracts
  data_files:
  - split: train
    path: mlp_pt_eurlex-contracts/train-*
- config_name: mlp_pt_eurlex-legislation
  data_files:
  - split: train
    path: mlp_pt_eurlex-legislation/train-*
- config_name: mlp_pt_legal-mc4
  data_files:
  - split: train
    path: mlp_pt_legal-mc4/train-*
- config_name: parlamento-pt
  data_files:
  - split: train
    path: parlamento-pt/train-*
- config_name: tesemo_v2
  data_files:
  - split: train
    path: tesemo_v2/train-*
---
# LegalPT

LegalPT aggregates the maximum amount of publicly available legal data in Portuguese, drawing from varied sources including legislation, jurisprudence, legal articles, and government documents.

This is the raw version. Deduplicated version is available [here](https://huggingface.co/datasets/eduagarcia/LegalPT_dedup).

## Dataset Details

Dataset is composed by six corpora: 
[Ulysses-Tesemõ](https://github.com/ulysses-camara/ulysses-tesemo), [MultiLegalPile (PT)](https://arxiv.org/abs/2306.02069v2), [ParlamentoPT](http://arxiv.org/abs/2305.06721),
[Iudicium Textum](https://www.inf.ufpr.br/didonet/articles/2019_dsw_Iudicium_Textum_Dataset.pdf), [Acordãos TCU](https://link.springer.com/chapter/10.1007/978-3-030-61377-8_46), and 
[DataSTF](https://legalhackersnatal.wordpress.com/2019/05/09/mais-dados-juridicos/).

- [**MultiLegalPile**](https://huggingface.co/datasets/joelniklaus/Multi_Legal_Pile) ([Paper](https://arxiv.org/abs/2306.02069v2)): a multilingual corpus of legal texts
comprising 689 GiB of data, covering 24 languages in 17 jurisdictions. The corpus is separated by language, and the subset in Portuguese contains 92GiB of data,
containing 13.76 billion words. This subset includes the jurisprudence of the Court of Justice of São Paulo (CJPG), appeals from the
[5th Regional Federal Court (BRCAD-5)](https://www.kaggle.com/datasets/eliasjacob/brcad5), the Portuguese subset of
legal documents from the European Union, known as [EUR-Lex](https://huggingface.co/datasetsjoelniklaus/eurlex_resources), and a filter for legal documents from
[MC4](http://arxiv.org/abs/2010.11934).
- [**Ulysses-Tesemõ**](https://github.com/ulysses-camara/ulysses-tesemo): a legal corpus in Brazilian Portuguese, composed of 2.2 million documents, totaling about 26GiB of text obtained from 96 different data sources. These sources encompass legal, legislative, academic papers, news, and related comments. The data was collected through web scraping of government websites.
- [**ParlamentoPT**](PORTULAN/parlamento-pt) ([Paper](http://arxiv.org/abs/2305.06721)): a corpus for training language models in European Portuguese. The data was collected from the Portuguese government portal and consists of 2.6 million documents of transcriptions of debates in the Portuguese Parliament.
- [**Iudicium Textum**](https://dadosabertos.c3sl.ufpr.br/acordaos/) ([Paper](https://www.inf.ufpr.br/didonet/articles/2019_dsw_Iudicium_Textum_Dataset.pdf)): consists of rulings, votes, and reports from the Supreme Federal Court (STF) of Brazil, published between 2010 and 2018. The dataset contains 1GiB of data extracted from PDFs.
- [**Acordãos TCU**](https://www.kaggle.com/datasets/ferraz/acordaos-tcu) ([Paper](https://link.springer.com/chapter/10.1007/978-3-030-61377-8_46)):  an open dataset from the Tribunal de Contas da União (Brazilian Federal Court of Accounts), containing 600,000 documents obtained by web scraping government websites. The documents span from 1992 to 2019.
- [**DataSTF**](https://legalhackersnatal.wordpress.com/2019/05/09/mais-dados-juridicos/)): a dataset of monocratic decisions from the Superior Court of Justice (STJ) in Brazil, containing 700,000 documents (5GiB of data).

### Dataset Description

- **Language(s) (NLP):** Portuguese (pt-BR and pt-PT)
- **Repository:** https://github.com/eduagarcia/roberta-legal-portuguese
- **Paper:** https://aclanthology.org/2024.propor-1.38/

## Citation

```bibtex
@inproceedings{garcia-etal-2024-robertalexpt,
    title = "{R}o{BERT}a{L}ex{PT}: A Legal {R}o{BERT}a Model pretrained with deduplication for {P}ortuguese",
    author = "Garcia, Eduardo A. S.  and
      Silva, Nadia F. F.  and
      Siqueira, Felipe  and
      Albuquerque, Hidelberg O.  and
      Gomes, Juliana R. S.  and
      Souza, Ellen  and
      Lima, Eliomar A.",
    editor = "Gamallo, Pablo  and
      Claro, Daniela  and
      Teixeira, Ant{\'o}nio  and
      Real, Livy  and
      Garcia, Marcos  and
      Oliveira, Hugo Gon{\c{c}}alo  and
      Amaro, Raquel",
    booktitle = "Proceedings of the 16th International Conference on Computational Processing of Portuguese",
    month = mar,
    year = "2024",
    address = "Santiago de Compostela, Galicia/Spain",
    publisher = "Association for Computational Lingustics",
    url = "https://aclanthology.org/2024.propor-1.38",
    pages = "374--383",
}
```

## Acknowledgment

This work has been supported by the AI Center of Excellence (Centro de Excelência em Inteligência Artificial – CEIA) of the Institute of Informatics at the Federal University of Goiás (INF-UFG).