Cloud Document AI v1 API - Class OcrConfig (3.10.0)

public sealed class OcrConfig : IMessage<OcrConfig>, IEquatable<OcrConfig>, IDeepCloneable<OcrConfig>, IBufferMessage, IMessage

Reference documentation and code samples for the Cloud Document AI v1 API class OcrConfig.

Config for Document OCR.

Inheritance

object > OcrConfig

Namespace

Google.Cloud.DocumentAI.V1

Assembly

Google.Cloud.DocumentAI.V1.dll

Constructors

OcrConfig()

public OcrConfig()

OcrConfig(OcrConfig)

public OcrConfig(OcrConfig other)
Parameter
NameDescription
otherOcrConfig

Properties

AdvancedOcrOptions

public RepeatedField<string> AdvancedOcrOptions { get; }

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.
Property Value
TypeDescription
RepeatedFieldstring

ComputeStyleInfo

[Obsolete]
public bool ComputeStyleInfo { get; set; }

Turn on font identification model and return font style information. Deprecated, use [PremiumFeatures.compute_style_info][google.cloud.documentai.v1.OcrConfig.PremiumFeatures.compute_style_info] instead.

Property Value
TypeDescription
bool

DisableCharacterBoxesDetection

public bool DisableCharacterBoxesDetection { get; set; }

Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0+ processors.

Property Value
TypeDescription
bool

EnableImageQualityScores

public bool EnableImageQualityScores { get; set; }

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.

Property Value
TypeDescription
bool

EnableNativePdfParsing

public bool EnableNativePdfParsing { get; set; }

Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.

Property Value
TypeDescription
bool

EnableSymbol

public bool EnableSymbol { get; set; }

Includes symbol level OCR information if set to true.

Property Value
TypeDescription
bool

Hints

public OcrConfig.Types.Hints Hints { get; set; }

Hints for the OCR model.

Property Value
TypeDescription
OcrConfigTypesHints

PremiumFeatures

public OcrConfig.Types.PremiumFeatures PremiumFeatures { get; set; }

Configurations for premium OCR features.

Property Value
TypeDescription
OcrConfigTypesPremiumFeatures