Class: Google::Apis::DiscoveryengineV1beta::GoogleCloudDiscoveryengineV1alphaOcrConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/discoveryengine_v1beta/classes.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb,
lib/google/apis/discoveryengine_v1beta/representations.rb

Overview

The OCR options for parsing documents.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDiscoveryengineV1alphaOcrConfig

Returns a new instance of GoogleCloudDiscoveryengineV1alphaOcrConfig.



2826
2827
2828
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 2826

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

Instance Attribute Details

#enabledBoolean Also known as: enabled?

Required. If OCR is enabled or not. OCR must be enabled for other OcrConfig options to apply. We will only perform OCR on the first 80 pages of the PDF files. Corresponds to the JSON property enabled

Returns:

  • (Boolean)


2810
2811
2812
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 2810

def enabled
  @enabled
end

#enhanced_document_elementsArray<String>

Apply additional enhanced OCR processing to a list of document elements. Supported values: * table: advanced table parsing model. Corresponds to the JSON property enhancedDocumentElements

Returns:

  • (Array<String>)


2817
2818
2819
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 2817

def enhanced_document_elements
  @enhanced_document_elements
end

#use_native_textBoolean Also known as: use_native_text?

If true, will use native text instead of OCR text on pages containing native text. Corresponds to the JSON property useNativeText

Returns:

  • (Boolean)


2823
2824
2825
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 2823

def use_native_text
  @use_native_text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2831
2832
2833
2834
2835
# File 'lib/google/apis/discoveryengine_v1beta/classes.rb', line 2831

def update!(**args)
  @enabled = args[:enabled] if args.key?(:enabled)
  @enhanced_document_elements = args[:enhanced_document_elements] if args.key?(:enhanced_document_elements)
  @use_native_text = args[:use_native_text] if args.key?(:use_native_text)
end