pub struct RecognizedLine {
pub text: String,
pub confidence: f32,
}Expand description
One crop read by OcrModel::recognize_crops /
OcrModel::recognize_det_boxes (#939).
Fields§
§text: StringThe CTC-decoded text, trimmed of surrounding whitespace (as the page OCR trims its cells); empty when nothing decoded.
confidence: f32The recognition confidence: the mean probability of the emitted
characters (PaddleOCR’s per-line score — what the page OCR reports on
its cells and ConfidenceReport::ocr_cells), 0.0 when nothing
decoded. Not the detector’s DetBox::score.
Implementations§
Source§impl RecognizedLine
impl RecognizedLine
Sourcepub fn passes_text_score(&self) -> bool
pub fn passes_text_score(&self) -> bool
Whether the page OCR would keep this line: non-empty text at or above
RapidOCR’s text_score (crate::ocr_prep::text_score, 0.5,
DOCLING_RS_OCR_TEXT_SCORE). The crop API itself drops nothing.
Trait Implementations§
Source§impl Clone for RecognizedLine
impl Clone for RecognizedLine
Source§impl Debug for RecognizedLine
impl Debug for RecognizedLine
Source§impl PartialEq for RecognizedLine
impl PartialEq for RecognizedLine
impl StructuralPartialEq for RecognizedLine
Auto Trait Implementations§
impl Forget for RecognizedLine
impl Freeze for RecognizedLine
impl RefUnwindSafe for RecognizedLine
impl Send for RecognizedLine
impl Sync for RecognizedLine
impl Unpin for RecognizedLine
impl UnsafeUnpin for RecognizedLine
impl UnwindSafe for RecognizedLine
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
Mutably borrows from an owned value. Read more
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> ErasedDestructor for Twhere
T: 'static,
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> ⓘ
Converts
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> ⓘ
Converts
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