arXiv:2609.07699cs.CLSep 2026

Manuscript Offprint

arXiv:2609.07699

Fine PT-PT Web: A High-Quality 41 Billion Tokens Data Collection of the European Portuguese Web

Gonçalo Vinagre, Rui Pedro Guerra, Pedro Gomes, Miguel Moura Ramos, Duarte Miguel Alves, Afonso Simplício, Diogo Tavares, David Semedo, Daniel Gomes, João Magalhães

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Curating Web corpora for regional language variants like European Portuguese (PT-PT) is heavily bottlenecked by dialectal overlap (mainly with PT-BR) and data processing scale. This paper presents an efficient pipeline to curate a production-ready PT-PT corpus from the Portuguese Web, spanning 411 TB of raw data from Arquivo.pt. We introduce a novel post-scraping block that removes boilerplate and line duplicates prior to filtering. This early-stage intervention increases final document yield by 19.04% by rescuing valid text that standard heuristic filters prematurely discard. Integrated with rigorous language identification, weighted fuzzy deduplication, and neural quality classification, our pipeline offers a scalable framework and a clean, representative corpus optimized for LLM pre-training.¹

1 Introduction

The success of modern Large Language Models (LLMs) relies heavily on the availability of massive, diverse, and high-quality text corpora. While general web scrapes like Common Crawl provide an abundant source of raw text, turning these uncurated dumps into high-quality training data requires sophisticated, multi-stage processing pipelines. For dominant, high-resource languages like English, extensive investments have yielded highly optimized, open-source recipes. However, developing comparable resources for mid-to-lower-resource languages, and specifically localized regional variants, remains a major hurdle for the natural language processing community. This challenge is particularly visible in the context of European Portuguese (PT-PT): while Portuguese is a global pluricentric language spoken globally by hundreds of millions of people, it is divided primarily into European Por-

tuguese and Brazilian Portuguese, alongside distinct African and Asian varieties. However, when it comes to data representativeness, it is overwhelmingly dominated by the Brazilian Portuguese (PT-BR) variety.

Standard Web-scraping and language identification filters often fail to adequately distinguish between PT-PT and PT-BR variants, and aggressively discard valid PT-PT content due to rigid heuristic boundaries. In this work, we present a highly efficient, end-to-end data processing pipeline built on top of the open-source Datatrove (Penedo et al., 2024b) library to build a high-quality, production-ready PT-PT Web corpus. Our pipeline processed several web collections from Arquivo.pt, the Portuguese Web Archive,² representing approximately 411 terabytes (TB) of raw WARC (Web ARCHive) data spanning from 1997 to 2024.

In our pipeline, depicted in Figure 1, we design and implement a custom post-scraping mechanism that cleans and structures raw scraped text before passing it to downstream heuristic quality filters. This component removes short, fragmented lines and local duplicate boilerplate text within documents. Our development experiments demonstrate that post-scraping substantially improves the effective quality of Web documents, rescuing valuable, linguistically rich data that standard filters would normally reject. This intervention alone yields a 19.04% increase in the final number of retained high-quality documents without compromising the rigorous standards required for LLM training. The resulting pipeline combines geographical domain filtering, neural language identification, heuristic text filters adapted from FineWeb2 (Penedo et al., 2025), custom weighted MinHash fuzzy deduplication, neural quality classification via EuroFilter (Martins et al., 2025), and cross-collection deduplication. The result is a robust, clean, and repre-

¹For the pipeline code, refer to https://github.com/AMALIA-LLM/arquivo_processing and https://github.com/AMALIA-LLM/datatrove-amalia

²https://arquivo.pt/collections/

Figure

Figure 1: Overview of the developed data processing pipeline. Starting from 71 collections totaling 411 TB of raw WARC data, the pipeline applies six sequential curation stages, yielding a final corpus of 41 billion tokens of high quality European Portuguese text.

sentative PT-PT corpus specifically optimized to power the mid-training and pre-training phases of next-generation language models.

References (12)