Class: Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3OcrConfig
- Inherits:
-
Object
- Object
- Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3OcrConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/documentai_v1beta3/classes.rb,
lib/google/apis/documentai_v1beta3/representations.rb,
lib/google/apis/documentai_v1beta3/representations.rb
Overview
Config for Document OCR.
Instance Attribute Summary collapse
-
#advanced_ocr_options ⇒ Array<String>
A list of advanced OCR options to further fine-tune OCR behavior.
-
#enable_image_quality_scores ⇒ Boolean
(also: #enable_image_quality_scores?)
Enables intelligent document quality scores after OCR.
-
#enable_native_pdf_parsing ⇒ Boolean
(also: #enable_native_pdf_parsing?)
Enables special handling for PDFs with existing text information.
-
#enable_symbol ⇒ Boolean
(also: #enable_symbol?)
Includes symbol level OCR information if set to true.
-
#hints ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3OcrConfigHints
Hints for OCR Engine Corresponds to the JSON property
hints.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta3OcrConfig
constructor
A new instance of GoogleCloudDocumentaiV1beta3OcrConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta3OcrConfig
Returns a new instance of GoogleCloudDocumentaiV1beta3OcrConfig.
8732 8733 8734 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 8732 def initialize(**args) update!(**args) end |
Instance Attribute Details
#advanced_ocr_options ⇒ Array<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.
Corresponds to the JSON property advancedOcrOptions
8704 8705 8706 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 8704 def @advanced_ocr_options end |
#enable_image_quality_scores ⇒ Boolean Also known as: enable_image_quality_scores?
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.
Corresponds to the JSON property enableImageQualityScores
8711 8712 8713 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 8711 def enable_image_quality_scores @enable_image_quality_scores end |
#enable_native_pdf_parsing ⇒ Boolean Also known as: enable_native_pdf_parsing?
Enables special handling for PDFs with existing text information. Results in
better text extraction quality in such PDF inputs.
Corresponds to the JSON property enableNativePdfParsing
8718 8719 8720 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 8718 def enable_native_pdf_parsing @enable_native_pdf_parsing end |
#enable_symbol ⇒ Boolean Also known as: enable_symbol?
Includes symbol level OCR information if set to true.
Corresponds to the JSON property enableSymbol
8724 8725 8726 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 8724 def enable_symbol @enable_symbol end |
#hints ⇒ Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3OcrConfigHints
Hints for OCR Engine
Corresponds to the JSON property hints
8730 8731 8732 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 8730 def hints @hints end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
8737 8738 8739 8740 8741 8742 8743 |
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 8737 def update!(**args) @advanced_ocr_options = args[:advanced_ocr_options] if args.key?(:advanced_ocr_options) @enable_image_quality_scores = args[:enable_image_quality_scores] if args.key?(:enable_image_quality_scores) @enable_native_pdf_parsing = args[:enable_native_pdf_parsing] if args.key?(:enable_native_pdf_parsing) @enable_symbol = args[:enable_symbol] if args.key?(:enable_symbol) @hints = args[:hints] if args.key?(:hints) end |