Principle:1broseidon Ketch Structural Extraction
| Knowledge Sources | |
|---|---|
| Domains | Extraction, HTML_Parsing |
| Last Updated | 2026-10-27 00:00 GMT |
Overview
An extraction method that reads a page's own structure — its landmark, its uniform sections, or the smallest element holding its prose — and prunes chrome by what the content is, not by a score, before falling back to readability scoring.
Theoretical Basis
Readability-style extractors score candidate elements by heuristics (link density, text length, class names) and pick the best. Structural extraction instead reads the page's declared structure: a landmark element (`<main>`, `<article>`, ARIA roles), a set of uniform sibling sections (repeated article cards), or the smallest element that holds the prose. Chrome (nav, footer, ads, cookie banners) is removed by identity — what an element is — not by a score that can be gamed.
The layered fallback contract: structural extraction first; readability (candidate scoring) for pages that declare no structure; raw HTML→markdown as the last resort. A `rawTableFallback` recovers data tables that the readability article dropped.
Usage
Use when extracting main content from arbitrary web pages where the page's own structure is a more reliable signal than score-based heuristics. Provide a readability fallback for unstructured pages and a raw fallback for pathological cases.