# Ekstrakcja tekstu ze stron i PDF

EN: **Text extraction from HTML and PDFs** · id `textextraction` · aliases: HTML extraction, boilerplate removal, PDF OCR

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Dane dla AI](https://aiatlasgraph.com/t/data.md) › [Czyszczenie i jakość](https://aiatlasgraph.com/t/cleaning.md) › Ekstrakcja tekstu ze stron i PDF

## Description

- PL: Wyciąganie właściwej treści z surowych stron i dokumentów: usuwanie menu, stopek i reklam, zamiana PDF (także skanów) na czysty tekst z zachowaniem struktury.
- EN: Pulling the actual content out of raw pages and documents: removing menus, footers and ads, turning PDFs (including scans) into clean text while keeping structure.

## In one sentence

- PL: To wydobywanie właściwego tekstu ze stron, skanów i dokumentów.
- EN: This extracts the useful text from pages, scans and documents.

## Problem it solves

- PL: Potrzebna treść ginie między menu i reklamami albo jest zapisana jako obraz, którego nie można przeszukać.
- EN: Useful content is mixed with menus and adverts or stored as an image that cannot be searched.

## What it does

- PL: Oddziela główną treść od dodatków i rozpoznaje tekst na obrazach, próbując zachować nagłówki, akapity oraz tabele.
- EN: It separates main content from surrounding clutter and reads text in images, trying to preserve headings, paragraphs and tables.

## Everyday example

- PL: Zeskanowaną instrukcję przerabiasz na tekst, żeby asystent mógł znaleźć rozdział o wymianie filtra.
- EN: You turn a scanned manual into text so an assistant can find the section about replacing a filter.

## This concerns you if you…

- PL: masz skany, których nie można przeszukać
- PL: chcesz wyciągnąć artykuł bez menu i reklam
- EN: have scans that cannot be searched
- EN: want an article's text without menus and adverts

## Keywords

Trafilatura · olmOCR · boilerplate removal · reading order · table extraction · OCR

## How it works

- PL: Parser dokumentu odtwarza strukturę, a reguły lub modele oddzielają treść główną od nawigacji. Przy skanach rozpoznawanie znaków i układu rekonstruuje tekst, kolejność czytania oraz powiązania tabel.
- EN: A document parser recovers structure, while rules or models separate main content from navigation. For scans, character and layout recognition reconstruct text, reading order and table relationships.

## Limits

- PL: Złożone kolumny, wzory i uszkodzone skany powodują utratę struktury. Ekstrakcja może wyglądać poprawnie mimo pominiętych fragmentów, dlatego potrzebuje kontroli kompletności.
- EN: Complex columns, formulas and damaged scans can lose structure. Extraction may look correct despite omitted passages, so completeness checks are necessary.

## Key terms

- PL: **boilerplate**: Powtarzalne elementy strony, takie jak menu, stopki i bannery.
- PL: **kolejność czytania**: Sekwencja bloków tekstu wynikająca z układu dokumentu.
- EN: **boilerplate**: Repeated page elements such as menus, footers and banners.
- EN: **reading order**: The sequence of text blocks implied by document layout.

## Know first

- [Pozyskiwanie danych z sieci (crawling) (Web crawling for training data)](https://aiatlasgraph.com/t/webcrawl.md)

## Examples

- PL: Trafilatura · usuwanie boilerplate · OCR modelem wizyjnym (olmOCR) · tabele i wzory
- EN: Trafilatura · boilerplate removal · OCR with a vision model (olmOCR) · tables and equations

## Related topics

Untyped, symmetric "see also" links.

- [Pozyskiwanie danych z sieci (crawling) (Web crawling for training data)](https://aiatlasgraph.com/t/webcrawl.md)
- [Przetwarzanie dokumentów (Document AI)](https://aiatlasgraph.com/t/docai.md)

## Sources

- [Trafilatura: discover web content, extract text and metadata (documentation)](<https://trafilatura.readthedocs.io/en/latest/>) `trafilatura-docs` · by Adrien Barbaresi
- [olmOCR: Unlocking Trillions of Tokens in PDFs with Vision Language Models](<https://arxiv.org/abs/2502.18443>) `olmocr-2025` · by Jake Poznanski, Aman Rangapur, Jon Borchardt, Jason Dunkelberger, Regan Huff, Daniel Lin, Christopher Wilhelm, Kyle Lo, Luca Soldaini
- [datatrove — repository (README)](<https://github.com/huggingface/datatrove>) `datatrove-github` · by Hugging Face

---

AI Atlas revision 124 (2026-10-31) · HTML: https://aiatlasgraph.com/t/textextraction · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
