Class: Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1OcrConfig
- Inherits:
-
Object
- Object
- Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1OcrConfig
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/documentai_v1/classes.rb,
lib/google/apis/documentai_v1/representations.rb,
lib/google/apis/documentai_v1/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.
-
#compute_style_info ⇒ Boolean
(also: #compute_style_info?)
Turn on font identification model and return font style information.
-
#disable_character_boxes_detection ⇒ Boolean
(also: #disable_character_boxes_detection?)
Turn off character box detector in OCR engine.
-
#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::DocumentaiV1::GoogleCloudDocumentaiV1OcrConfigHints
Hints for OCR Engine Corresponds to the JSON property
hints
. -
#premium_features ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1OcrConfigPremiumFeatures
Configurations for premium OCR features.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudDocumentaiV1OcrConfig
constructor
A new instance of GoogleCloudDocumentaiV1OcrConfig.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudDocumentaiV1OcrConfig
Returns a new instance of GoogleCloudDocumentaiV1OcrConfig.
5005 5006 5007 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 5005 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
4958 4959 4960 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 4958 def @advanced_ocr_options end |
#compute_style_info ⇒ Boolean Also known as: compute_style_info?
Turn on font identification model and return font style information.
Deprecated, use PremiumFeatures.compute_style_info instead.
Corresponds to the JSON property computeStyleInfo
4964 4965 4966 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 4964 def compute_style_info @compute_style_info end |
#disable_character_boxes_detection ⇒ Boolean Also known as: disable_character_boxes_detection?
Turn off character box detector in OCR engine. Character box detection is
enabled by default in OCR 2.0 (and later) processors.
Corresponds to the JSON property disableCharacterBoxesDetection
4971 4972 4973 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 4971 def disable_character_boxes_detection @disable_character_boxes_detection 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
4979 4980 4981 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 4979 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
4986 4987 4988 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 4986 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
4992 4993 4994 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 4992 def enable_symbol @enable_symbol end |
#hints ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1OcrConfigHints
Hints for OCR Engine
Corresponds to the JSON property hints
4998 4999 5000 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 4998 def hints @hints end |
#premium_features ⇒ Google::Apis::DocumentaiV1::GoogleCloudDocumentaiV1OcrConfigPremiumFeatures
Configurations for premium OCR features.
Corresponds to the JSON property premiumFeatures
5003 5004 5005 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 5003 def premium_features @premium_features end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5010 5011 5012 5013 5014 5015 5016 5017 5018 5019 |
# File 'lib/google/apis/documentai_v1/classes.rb', line 5010 def update!(**args) @advanced_ocr_options = args[:advanced_ocr_options] if args.key?(:advanced_ocr_options) @compute_style_info = args[:compute_style_info] if args.key?(:compute_style_info) @disable_character_boxes_detection = args[:disable_character_boxes_detection] if args.key?(:disable_character_boxes_detection) @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) @premium_features = args[:premium_features] if args.key?(:premium_features) end |