pub struct ConfidenceReport {
pub pages: BTreeMap<usize, PageConfidence>,
}Expand description
The document-level report (docling’s ConfidenceReport): the four scores
aggregated across pages, plus the per-page breakdown. Page keys are the
real 1-based page numbers — the same numbering as the JSON export’s
pages map (#171), --pages windows included. (docling keys by its
0-based internal page index; ours is the more useful spelling and the
difference is documented in docs/MIGRATION.md.)
Fields§
§pages: BTreeMap<usize, PageConfidence>Implementations§
Source§impl ConfidenceReport
impl ConfidenceReport
Sourcepub fn from_pages(pages: BTreeMap<usize, PageConfidence>) -> ConfidenceReport
pub fn from_pages(pages: BTreeMap<usize, PageConfidence>) -> ConfidenceReport
Build from per-page scores keyed by 1-based page number.
Sourcepub fn layout_score(&self) -> Option<f64>
pub fn layout_score(&self) -> Option<f64>
Document layout_score: mean of the per-page values.
Sourcepub fn parse_score(&self) -> Option<f64>
pub fn parse_score(&self) -> Option<f64>
Document parse_score: 10th percentile of the per-page values
(docling: quantile here too, to emphasise problem pages).
Sourcepub fn table_score(&self) -> Option<f64>
pub fn table_score(&self) -> Option<f64>
Document table_score: mean of the per-page values.
Sourcepub fn mean_score(&self) -> Option<f64>
pub fn mean_score(&self) -> Option<f64>
Document mean_score: mean of the per-page mean scores.
Sourcepub fn low_score(&self) -> Option<f64>
pub fn low_score(&self) -> Option<f64>
Document low_score: mean (sic — docling’s override uses nanmean,
not a quantile) of the per-page low scores.
pub fn mean_grade(&self) -> QualityGrade
pub fn low_grade(&self) -> QualityGrade
Sourcepub fn to_json(&self) -> Value
pub fn to_json(&self) -> Value
The full report as JSON — docling’s ConfidenceReport dump shape
(unset scores as null, grades as lowercase strings, pages keyed by
stringified page number).
Sourcepub fn summary_json(&self) -> Value
pub fn summary_json(&self) -> Value
The document-level scores/grades only (no pages) — compact enough
for a response header.
Trait Implementations§
Source§impl Clone for ConfidenceReport
impl Clone for ConfidenceReport
Source§fn clone(&self) -> ConfidenceReport
fn clone(&self) -> ConfidenceReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConfidenceReport
impl Debug for ConfidenceReport
Source§impl Default for ConfidenceReport
impl Default for ConfidenceReport
Source§fn default() -> ConfidenceReport
fn default() -> ConfidenceReport
Source§impl PartialEq for ConfidenceReport
impl PartialEq for ConfidenceReport
impl StructuralPartialEq for ConfidenceReport
Auto Trait Implementations§
impl Freeze for ConfidenceReport
impl RefUnwindSafe for ConfidenceReport
impl Send for ConfidenceReport
impl Sync for ConfidenceReport
impl Unpin for ConfidenceReport
impl UnsafeUnpin for ConfidenceReport
impl UnwindSafe for ConfidenceReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().