pub enum ConfidenceSemantics {
Legibility {
scale_max: f64,
},
Uncalibrated,
None,
}Expand description
How a backend’s reported page-level confidence must be interpreted.
Backend confidence scores are not interchangeable. Tesseract’s mean word confidence is a
classifier score validated to track legibility on a 0-100 scale. Sceptre (EasyOCR-based)
reports a length-penalised custom_mean that is rescaled into the same 0-100 range but is
not comparable — its ordering can be inverted relative to legibility (a dense prose page
can score lower than a nearly-blank one). A page-rejection gate calibrated on Tesseract’s
scale was once applied unconditionally to sceptre’s output and rejected every page of a
16-page document, emptying it. This descriptor exists so gating code can ask a backend what
its number means instead of assuming.
Variants§
Legibility
Validated to track legibility on a known scale — usable as an absolute quality gate.
Uncalibrated
A number is reported, but it is not validated to correlate with legibility. Never gate on it.
None
No page-level confidence is reported at all.
Trait Implementations§
Source§impl Clone for ConfidenceSemantics
impl Clone for ConfidenceSemantics
impl Copy for ConfidenceSemantics
Source§impl Debug for ConfidenceSemantics
impl Debug for ConfidenceSemantics
Source§impl Default for ConfidenceSemantics
impl Default for ConfidenceSemantics
Source§impl<'de> Deserialize<'de> for ConfidenceSemantics
impl<'de> Deserialize<'de> for ConfidenceSemantics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for ConfidenceSemantics
impl PartialEq for ConfidenceSemantics
Source§impl Serialize for ConfidenceSemantics
impl Serialize for ConfidenceSemantics
impl StructuralPartialEq for ConfidenceSemantics
Auto Trait Implementations§
impl Freeze for ConfidenceSemantics
impl RefUnwindSafe for ConfidenceSemantics
impl Send for ConfidenceSemantics
impl Sync for ConfidenceSemantics
impl Unpin for ConfidenceSemantics
impl UnsafeUnpin for ConfidenceSemantics
impl UnwindSafe for ConfidenceSemantics
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more