# Document AI V1 API - Class Google::Cloud::DocumentAI::V1::OcrConfig (v1.12.1)

1.12.1 (latest) 1.12.0 1.11.0 1.10.2 1.9.0 1.8.0 1.7.0 1.6.1 1.5.1 1.4.0 1.3.0 1.2.0 1.1.1 1.0.0 0.23.1 0.22.0 0.21.1 0.20.0 0.19.0 0.18.0 0.17.2 0.16.2 0.15.0 0.14.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.2.4 Reference documentation and code samples for the Document AI V1 API class Google::Cloud::DocumentAI::V1::OcrConfig.

Config for Document OCR.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #advanced_ocr_options

    def advanced_ocr_options() -> ::Array<::String>

**Returns**

- (::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.

### #advanced_ocr_options=

    def advanced_ocr_options=(value) -> ::Array<::String>

**Parameter**

- **value** (::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.
**Returns**

- (::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.

### #compute_style_info

    def compute_style_info() -> ::Boolean

**Returns**

- (::Boolean) --- Turn on font identification model and return font style information. Deprecated, use [PremiumFeatures.compute_style_info](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-PremiumFeatures#Google__Cloud__DocumentAI__V1__OcrConfig__PremiumFeatures_compute_style_info_instance_ "Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures#compute_style_info (method)") instead.

### #compute_style_info=

    def compute_style_info=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Turn on font identification model and return font style information. Deprecated, use [PremiumFeatures.compute_style_info](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-PremiumFeatures#Google__Cloud__DocumentAI__V1__OcrConfig__PremiumFeatures_compute_style_info_instance_ "Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures#compute_style_info (method)") instead.
**Returns**

- (::Boolean) --- Turn on font identification model and return font style information. Deprecated, use [PremiumFeatures.compute_style_info](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-PremiumFeatures#Google__Cloud__DocumentAI__V1__OcrConfig__PremiumFeatures_compute_style_info_instance_ "Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures#compute_style_info (method)") instead.

### #disable_character_boxes_detection

    def disable_character_boxes_detection() -> ::Boolean

**Returns**

- (::Boolean) --- Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0 (and later) processors.

### #disable_character_boxes_detection=

    def disable_character_boxes_detection=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0 (and later) processors.
**Returns**

- (::Boolean) --- Turn off character box detector in OCR engine. Character box detection is enabled by default in OCR 2.0 (and later) processors.

### #enable_image_quality_scores

    def enable_image_quality_scores() -> ::Boolean

**Returns**

- (::Boolean) --- 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.

### #enable_image_quality_scores=

    def enable_image_quality_scores=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- 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.
**Returns**

- (::Boolean) --- 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.

### #enable_native_pdf_parsing

    def enable_native_pdf_parsing() -> ::Boolean

**Returns**

- (::Boolean) --- Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.

### #enable_native_pdf_parsing=

    def enable_native_pdf_parsing=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.
**Returns**

- (::Boolean) --- Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.

### #enable_symbol

    def enable_symbol() -> ::Boolean

**Returns**

- (::Boolean) --- Includes symbol level OCR information if set to true.

### #enable_symbol=

    def enable_symbol=(value) -> ::Boolean

**Parameter**

- **value** (::Boolean) --- Includes symbol level OCR information if set to true.
**Returns**

- (::Boolean) --- Includes symbol level OCR information if set to true.

### #hints

    def hints() -> ::Google::Cloud::DocumentAI::V1::OcrConfig::Hints

**Returns**

- ([::Google::Cloud::DocumentAI::V1::OcrConfig::Hints](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-Hints)) --- Hints for the OCR model.

### #hints=

    def hints=(value) -> ::Google::Cloud::DocumentAI::V1::OcrConfig::Hints

**Parameter**

- **value** ([::Google::Cloud::DocumentAI::V1::OcrConfig::Hints](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-Hints)) --- Hints for the OCR model.
**Returns**

- ([::Google::Cloud::DocumentAI::V1::OcrConfig::Hints](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-Hints)) --- Hints for the OCR model.

### #premium_features

    def premium_features() -> ::Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures

**Returns**

- ([::Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-PremiumFeatures)) --- Configurations for premium OCR features.

### #premium_features=

    def premium_features=(value) -> ::Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures

**Parameter**

- **value** ([::Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-PremiumFeatures)) --- Configurations for premium OCR features.
**Returns**

- ([::Google::Cloud::DocumentAI::V1::OcrConfig::PremiumFeatures](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-document_ai-v1/latest/Google-Cloud-DocumentAI-V1-OcrConfig-PremiumFeatures)) --- Configurations for premium OCR features.