Skip to main content
Version: 10.3.1

Configure OCR provider

Work.AI offers the following OCR providers:

  • ABBYY
  • Azure AI Document Intelligence
  • Google Vision
  • Paddle OCR

Any response from the Azure, Google Vision, and Paddle OCR providers is converted to the ABBYY output format.

warning

The Azure, Google Vision, and Paddle OCR providers are available only from the OCR step in the Control Tower user interface. ABBYY is available both from REST API and the OCR step.

Select OCR provider

You can select an OCR provider when configuring an OCR step in a Business Process. For more details, see Add OCR step to Business Process.

For Google Vision and Azure to work correctly, check that their default configurations include the following parameters:

  • OCR type: Enriched
  • exportFormat: xmlForCorrectedImage,xmlWithoutRecognitionVariants
  • writeRecognitionVariants: true
  • skipPreprocessing: false
  • storePreprocessedDoc: true
  • timeout: 60

caution

If any of the settings are not configured as above for Google Vision or Azure, OCR throws an exception.

Set Secrets Vault credentials

To use the Google Vision or Azure provider, set up additional Secrets Vault credentials. Since WorkFusion does not manage Google secret keys and Azure credentials, add them in the config.yml file.

There are two methods to provide vault credentials for Google and Azure:

note

ocr_google_key must have a Base64 encoded JSON Google key. Otherwise, there can be issues with different escaping for Ansible. If you pass the key as JSON or separate properties, there can be problems with the private key containing \n new lines and vault values with new lines.

  • Method 1. When there is no existing installation, set the following properties in config.yml:

    • ocr_google_key
    • ocr_azure_password
    • ocr_azure_endpoint
  • Method 2. Set or create (if needed) the same properties in config_overrides.yml on the/opt/workfusion/wf_installer path. To override the parameters in the backup, run the following command: ./install.sh install installer-backup -e @config_overrides.yml.

    Execute ./install.sh configure ocr -e @config_overrides.yml to restart the OCR application with the parameters from config_overrides.yml.

If the above steps cause errors, make sure that the Ansible vault pass and key properties are set by running the following commands:

cd /opt/workfusion/wf_installer

export ANSIBLE_VAULT_PASS=$(cat config_overrides.yml | grep ansible_vault_password | cut -c 25- | tail -1)

export ANSIBLE_PRIVATE_KEY_FILE="id_rsa"