Struct google_api_proto::google::cloud::documentai::v1beta3::OcrConfig
source · pub struct OcrConfig {
pub hints: Option<Hints>,
pub enable_native_pdf_parsing: bool,
pub enable_image_quality_scores: bool,
pub advanced_ocr_options: Vec<String>,
pub enable_symbol: bool,
pub compute_style_info: bool,
pub disable_character_boxes_detection: bool,
pub premium_features: Option<PremiumFeatures>,
}
Expand description
Config for Document OCR.
Fields§
§hints: Option<Hints>
Hints for the OCR model.
enable_native_pdf_parsing: bool
Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.
enable_image_quality_scores: bool
Enables intelligent document quality scores after OCR. Can help with diagnosing why OCR responses are of poor quality for a given input. Adds additional latency comparable to regular OCR to the process call.
advanced_ocr_options: Vec<String>
A list of advanced OCR options to further fine-tune OCR behavior. Current valid values are:
legacy_layout
: a heuristics layout detection algorithm, which serves as an alternative to the current ML-based layout detection algorithm. Customers can choose the best suitable layout algorithm based on their situation.
enable_symbol: bool
Includes symbol level OCR information if set to true.
compute_style_info: bool
Turn on font identification model and return font style information. Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1beta3.OcrConfig.PremiumFeatures.compute_style_info] instead.
disable_character_boxes_detection: bool
Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0 (and later) processors.
Configurations for premium OCR features.
Trait Implementations§
source§impl Message for OcrConfig
impl Message for OcrConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for OcrConfig
impl PartialEq for OcrConfig
impl StructuralPartialEq for OcrConfig
Auto Trait Implementations§
impl Freeze for OcrConfig
impl RefUnwindSafe for OcrConfig
impl Send for OcrConfig
impl Sync for OcrConfig
impl Unpin for OcrConfig
impl UnwindSafe for OcrConfig
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request