pub enum OcrLang {
En,
Ch,
}Expand description
OCR recognition language: which PP-OCRv3 model + dictionary pair runs.
The default is English (models/ocr_rec_en.onnx + models/en_dict.txt):
the multilingual ch_ model reads Latin scripts with badly degraded word
spacing (glued words on ordinary English scans), which is the common
real-world case. Ch selects the ch_ pair (models/ocr_rec.onnx +
models/ppocr_keys_v1.txt) — that is what upstream docling conformance is
measured with, and scripts/conformance/pdf_*.sh pin it explicitly (by
path, which wins over this selector).
Variants§
En
en_PP-OCRv3 — English-only, proper Latin word spacing.
Ch
ch_PP-OCRv3 — multilingual; the docling-conformance model.
Implementations§
Trait Implementations§
impl Copy for OcrLang
impl Eq for OcrLang
impl StructuralPartialEq for OcrLang
Auto Trait Implementations§
impl Freeze for OcrLang
impl RefUnwindSafe for OcrLang
impl Send for OcrLang
impl Sync for OcrLang
impl Unpin for OcrLang
impl UnsafeUnpin for OcrLang
impl UnwindSafe for OcrLang
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,
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
Compare self to
key and return true if they are equal.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 moreSource§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>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().