--- language: - pt license: cc-by-4.0 size_categories: - 1B [More Information Needed] ## Data Collection and Processing LegalPT is deduplicated using [MinHash algorithm](https://dl.acm.org/doi/abs/10.5555/647819.736184) and [Locality Sensitive Hashing](https://dspace.mit.edu/bitstream/handle/1721.1/134231/v008a014.pdf?sequence=2&isAllowed=y), following the approach of [Lee et al. (2022)](http://arxiv.org/abs/2107.06499). We used 5-grams and a signature of size 256, considering two documents to be identical if their Jaccard Similarity exceeded 0.7. Duplicate rate found by the Minhash-LSH algorithm for the LegalPT corpus: | **Corpus** | **Documents** | **Docs. after deduplication** | **Duplicates (%)** | |--------------------------|:--------------:|:-----------------------------:|:------------------:| | Ulysses-Tesemõ | 2,216,656 | 1,737,720 | 21.61 | | MultiLegalPile (PT) | | | | | CJPG | 14,068,634 | 6,260,096 | 55.50 | | BRCAD-5 | 3,128,292 | 542,680 | 82.65 | | EUR-Lex (Caselaw) | 104,312 | 78,893 | 24.37 | | EUR-Lex (Contracts) | 11,581 | 8,511 | 26.51 | | EUR-Lex (Legislation) | 232,556 | 95,024 | 59.14 | | Legal MC4 | 191,174 | 187,637 | 1.85 | | ParlamentoPT | 2,670,846 | 2,109,931 | 21.00 | | Iudicium Textum | 198,387 | 153,373 | 22.69 | | Acordãos TCU | 634,711 | 462,031 | 27.21 | | DataSTF | 737,769 | 310,119 | 57.97 | | **Total (LegalPT)** | **24,194,918** | **11,946,015** | **50.63** | ## Citation