A crawled page is mostly wrapping — nav, ads, scripts, footers. Extraction pulls the clean article text out of that wrapping, turns PDFs and scans into markdown, and tags the language — all before a single token is made.
You've seen the pile of pages get filtered. Now zoom into one page: even a good one is mostly boilerplate — nav, ads, headers, footers — wrapped around a thin slice of article.
Not every source is tidy HTML. PDFs, scans and images carry great text — but you can't just read it off. Layout detection and OCR recover it as clean markdown.
Before anything gets mixed together, a fast classifier reads each document and tags its language — so the corpus can be balanced across languages on purpose, not left to whatever the web happened to have.
The text is clean, structured and tagged by language — but clean isn't the same as good. Next, a model that grades the web: a small classifier scores every page from 0 to 1 and keeps only the high scorers.