Expand description
Per-page conversion-confidence scoring (#183) — the Rust port of docling’s
confidence plumbing: rate_text_quality from the page-preprocessing stage
(parse quality of the extracted text layer) and the layout/OCR score
aggregation the layout-postprocessing and OCR stages assign.
Functions§
- layout_
score - The page
layout_score: mean confidence of the final (postprocessed) layout regions —Some(0.0)for a region-less page, exactly like docling’sfloat(np.mean(...)) if clusters else 0.0. - ocr_
score - The page
ocr_score: mean recognition confidence over the page’s OCR’d cells; unset when nothing on the page came from OCR (docling only assigns it when OCR cells exist). - page_
confidence - Assemble the page’s
PageConfidence(table_scorestays unset — docling never assigns it either). - parse_
score - The page
parse_score: the 10th-percentilerate_text_qualityover the extracted text-layer cells (the quantile emphasises problem cells, matching docling’s page-preprocessing stage). Unset when the page has no text layer (a scanned page — docling’snanquantile([])isNaNthere too). - rate_
text_ quality - docling’s
rate_text_quality: score one text cell’s extraction quality. Hard garbage (replacement chars,GLYPH<..>references,/G123-style glyph ids, mostly-slash-number content) is a 0.0; otherwise fragmented-word runs (W/or.ds/sp.litartifacts) are penalised 0.1 each once at least three appear.