Datasets:
File size: 6,027 Bytes
802aae5 | 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 | ---
license: cc-by-sa-4.0
language:
- pt
pretty_name: PT-BR Wikipedia (cleaned, encyclopedia only)
size_categories:
- 1M<n<10M
task_categories:
- text-generation
tags:
- pt-br
- brazilian-portuguese
- wikipedia
- encyclopedia
- pretraining
configs:
- config_name: default
data_files:
- split: train
path: data/*.parquet
---
# PT-BR Wikipedia (cleaned, encyclopedia only)
Part of the **MagTina350m pretrain corpus release** by [Dataseek](https://dataseek.com.br)
under the Magestic.ai brand. This is one of nine silver-layer datasets that fed
[`dataseek/magtina350m-base`](https://huggingface.co/dataseek/magtina350m-base).
## Summary
1.08 M Brazilian-Portuguese Wikipedia articles, cleaned of wiki-markup, templates, user-talk welcome banners ("Bem-vindo, X!"), VfD voting discussions, eliminação notification templates, JS/CSS gadget pages and talk-page conversations (detected by inline HHhMMmin timestamps). 35 % of the raw silver was discarded as MediaWiki-internal content. Used at ~2 epochs in MagTina350m pretrain.
## Source and collection method
Source: PT-BR Wikipedia dump (mid-2026 snapshot) → mwparserfromhell → template/reference strip → NFKD normalisation → langid='pt' gate (catches mistaken en/es entries) → length floor 200 chars → **v3 cleanup pass (2026-05-12) — see `scripts/release/cleanup_and_export_wiki.py` — that drops welcome banners, VfD ballots, talk-page timestamp signatures, eliminação notification templates and gadget JS/CSS pages**.
**ETL script (in the MagTina1B repository):** [`scripts/etl/recover_wikipt_cleaned.py`](https://huggingface.co/dataseek/magtina350m-base) *(public release of the ETL scripts is on the roadmap; until then the data card below documents the recipe in full).*
## Filters and deduplication
The following filters were applied before this dataset reached its silver
(release-ready) state:
- Strip wiki templates, refs, infoboxes (initial ETL)
- FastText langid='pt'
- v3 cleanup: 22 pattern filters covering welcome banners, talk pages, VfD votes, eliminação notifications, gadget JS/CSS, redirects
- Inline `HHhMMmin de DD de MMM de YYYY` timestamp filter (catches all talk-page conversation content not already covered)
- len(text) ≥ 200 chars (silver gate, preserved through cleanup)
Global URL-normalised deduplication was applied across all web-derived corpora
(`webpages`, `news`, `blogs`) so the same article does not appear twice across
those three datasets.
## Schema
| Column | Type | Description |
|---|---|---|
| `id` | `int32` | Wikipedia page id. |
| `text` | `string` | Cleaned article text (v2 boilerplate-stripped). |
| `n_chars` | `int32` | Character count of `text`. |
| `n_words` | `int32` | Whitespace-split word count of `text`. |
Columns dropped at export (kept private as ETL internals): `_part`
## Size statistics
| Metric | Value |
|---|---:|
| Rows | 1.08 M (1,084,716) |
| Characters | 2.62 B (2,615,639,056) |
| Estimated tokens (PT-BR, chars / 4.5) | 581.25 M |
| Compressed Parquet on disk | ~1.46 GB |
*Sampled at ~2.8 epochs* — the silver corpus has 581.25 M unique tokens, of which 1.601 B were drawn during MagTina350m's single pretrain pass.
**Used in MagTina350m pretrain:** 1.601 B tokens
(9.2 % of MagTina350m's 17.39 B-token pretrain budget).
## How to load
```python
from datasets import load_dataset
ds = load_dataset("dataseek/ptbr-wiki", split="train", streaming=True)
for row in ds.take(5):
print(row["text"][:200])
```
Streaming is recommended for the larger configs. For the smaller datasets
(`ptbr-dou`, `ptbr-books-publicos`) eager loading is fine.
## Licensing
CC-BY-SA 4.0 — inherited from Wikipedia. Any derivative work that incorporates this dataset must also be licensed CC-BY-SA-compatible.
**Upstream attribution:** Wikimedia Foundation — https://dumps.wikimedia.org/ptwiki/ ; individual contributors retain copyright per CC-BY-SA 4.0.
## Citation
If you use this dataset, please cite both the upstream source and MagTina350m:
```bibtex
@misc{magtina350m_pretrain_2026,
title = {MagTina350m pretrain corpus — PT-BR Wikipedia (cleaned, encyclopedia only)},
author = {Frasson, Ricardo and {Dataseek Team}},
year = 2026,
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/dataseek/ptbr-wiki}
}
```
Please also honour the upstream license terms — for CC-BY-derived data,
attribution to the upstream creators is mandatory; for CC-BY-SA, downstream
derivatives must remain CC-BY-SA-compatible.
## Intended use
- Pre-training, continued pre-training, or domain-adapting of Brazilian Portuguese
language models.
- PT-BR NLP research where statistically representative public-web / academic /
legal / encyclopedic data is needed.
- Reproducing or improving on the MagTina350m result.
## Known limitations and PII statement
- **Text was NOT PII-scrubbed.** URLs, emails, phone numbers and personal names
that occurred in the source data may still be present. We strip zero-width
characters and normalise Unicode but we do not run an NER pass.
- **Crawled data carries upstream biases** of CommonCrawl, Wikipedia, news outlets
and academic institutions present in the source. We have not audited these.
- **No safety filtering** beyond langid and basic alpha-ratio gates. Hate-speech,
spam and adult content present in the source remain unless caught incidentally.
- **Provenance preserved at row level.** Every row has either a `url`, `source` or
`doc_id` column that points back to upstream — this is intentional, so consumers
can re-license, redact or filter.
## Related releases
- **Model:** [`dataseek/magtina350m-base`](https://huggingface.co/dataseek/magtina350m-base) (354.6 M params, pretrained on this corpus + 8 sibling datasets)
- **Instruct model:** [`dataseek/magtina350m-instruct`](https://huggingface.co/dataseek/magtina350m-instruct)
- **Sibling datasets:** see `dataseek/ptbr-*` for all nine corpora
## License
[cc-by-sa-4.0](https://spdx.org/licenses/cc-by-sa-4.0.html)
|