Class: Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3OcrConfig

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta3OcrConfig

Returns a new instance of GoogleCloudDocumentaiV1beta3OcrConfig.



10769
10770
10771
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10769

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#advanced_ocr_optionsArray<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

Returns:

  • (Array<String>)


10722
10723
10724
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10722

def advanced_ocr_options
  @advanced_ocr_options
end

#compute_style_infoBoolean 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

Returns:

  • (Boolean)


10728
10729
10730
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10728

def compute_style_info
  @compute_style_info
end

#disable_character_boxes_detectionBoolean 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

Returns:

  • (Boolean)


10735
10736
10737
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10735

def disable_character_boxes_detection
  @disable_character_boxes_detection
end

#enable_image_quality_scoresBoolean 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

Returns:

  • (Boolean)


10743
10744
10745
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10743

def enable_image_quality_scores
  @enable_image_quality_scores
end

#enable_native_pdf_parsingBoolean 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

Returns:

  • (Boolean)


10750
10751
10752
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10750

def enable_native_pdf_parsing
  @enable_native_pdf_parsing
end

#enable_symbolBoolean Also known as: enable_symbol?

Includes symbol level OCR information if set to true. Corresponds to the JSON property enableSymbol

Returns:

  • (Boolean)


10756
10757
10758
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10756

def enable_symbol
  @enable_symbol
end

#hintsGoogle::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3OcrConfigHints

Hints for OCR Engine Corresponds to the JSON property hints



10762
10763
10764
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10762

def hints
  @hints
end

#premium_featuresGoogle::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3OcrConfigPremiumFeatures

Configurations for premium OCR features. Corresponds to the JSON property premiumFeatures



10767
10768
10769
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10767

def premium_features
  @premium_features
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 10774

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