ProcessOptions

Stay organized with collections Save and categorize content based on your preferences.

Options for Process API

JSON representation
{
  "ocrConfig": {
    object (OcrConfig)
  }
}
Fields
ocrConfig

object (OcrConfig)

Only applicable to "Document OCR Processor". Returns error if set on other processor types.

OcrConfig

Config for Document OCR.

JSON representation
{
  "hints": {
    object (Hints)
  },
  "enableNativePdfParsing": boolean,
  "enableImageQualityScores": boolean,
  "advancedOcrOptions": [
    string
  ],
  "enableSymbol": boolean
}
Fields
hints

object (Hints)

Hints for the OCR model.

enableNativePdfParsing

boolean

Enables special handling for PDFs with existing text information. Results in better text extraction quality in such PDF inputs.

enableImageQualityScores

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.

advancedOcrOptions[]

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.
enableSymbol

boolean

Includes symbol level OCR information if set to true.

Hints

Hints for OCR Engine

JSON representation
{
  "languageHints": [
    string
  ]
}
Fields
languageHints[]

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).