Class: Google::Apis::DocumentaiV1beta3::GoogleCloudDocumentaiV1beta3OcrConfigHints

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

Hints for OCR Engine

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDocumentaiV1beta3OcrConfigHints

Returns a new instance of GoogleCloudDocumentaiV1beta3OcrConfigHints.



9385
9386
9387
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 9385

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

Instance Attribute Details

#language_hintsArray<String>

List of BCP-47 language codes to use for OCR. In most cases, not specifying it yields the best results since it enables automatic language detection. For languages based on the Latin alphabet, setting hints is not needed. In rare cases, when the language of the text in the image is known, setting a hint will help get better results (although it will be a significant hindrance if the hint is wrong). Corresponds to the JSON property languageHints

Returns:

  • (Array<String>)


9383
9384
9385
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 9383

def language_hints
  @language_hints
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



9390
9391
9392
# File 'lib/google/apis/documentai_v1beta3/classes.rb', line 9390

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