pub struct VisionAdvice {
pub no_text_layer: bool,
pub low_confidence_table: bool,
pub figure: bool,
}Expand description
Why a page may be worth sending to a vision model (#624).
A flag with its reasons rather than a bare boolean, because an agent that routes a page somewhere expensive wants to know what it is routing: a scan needs OCR, a chart needs a picture read, and a table we are unsure of needs neither – it needs a second opinion on a structure we already have.
Fields§
§no_text_layer: boolThe page draws ink but yields no text: a scan, or text drawn as curves.
This is the one signal of the three that is measured rather than promised. On the DocLayNet sample of the round of 24-09-2026 it holds for 25 of 200 pages – twelve per cent – and on those pages nothing is extracted at all: the page carries no usable text layer, which is what makes them worth a vision model rather than a better parser.
low_confidence_table: boolThe page holds a table the table model is unsure of.
ALWAYS FALSE TODAY, and deliberately so rather than guessed at: the learned table structure of #600 is not on master, and the heuristics that find a table there now produce a decision and not a probability. A confidence invented from a heuristic would be a number with nothing behind it, which is the opposite of what this whole flag is for.
figure: boolThe page holds a chart or a figure whose content is not text.
ALWAYS FALSE TODAY. crate::BlockKind has no figure variant – the
engine does not detect one – so there is nothing to report. The
measurement that says it is worth having is on #574: a figure’s data
labels are one of the three shapes we turn into a table, and on those
pages our text score is 0.433 against the reference’s 0.526.
Implementations§
Source§impl VisionAdvice
impl VisionAdvice
Sourcepub fn needs_vision(&self) -> bool
pub fn needs_vision(&self) -> bool
Whether any reason holds.
Trait Implementations§
Source§impl Clone for VisionAdvice
impl Clone for VisionAdvice
impl Copy for VisionAdvice
Source§impl Debug for VisionAdvice
impl Debug for VisionAdvice
Source§impl Default for VisionAdvice
impl Default for VisionAdvice
impl Eq for VisionAdvice
Source§impl PartialEq for VisionAdvice
impl PartialEq for VisionAdvice
impl StructuralPartialEq for VisionAdvice
Auto Trait Implementations§
impl Freeze for VisionAdvice
impl RefUnwindSafe for VisionAdvice
impl Send for VisionAdvice
impl Sync for VisionAdvice
impl Unpin for VisionAdvice
impl UnsafeUnpin for VisionAdvice
impl UnwindSafe for VisionAdvice
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<T> CloneAny for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt 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().