Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:A9T9 RPA OCR Engine Selection

From Leeroopedia
Knowledge Sources
Domains OCR, Engine_Selection
Last Updated 2026-10-22 00:00 GMT

Overview

Mechanism for selecting the appropriate OCR engine (cloud, local, or AI) based on configuration, availability, and execution scope.

Description

OCR Engine Selection is the routing layer that determines which OCR engine handles a text recognition request. The selection depends on:

  • Configuration: the user's OCR engine setting (cloud engine number, local engine, or AI provider)
  • Availability: whether the local XModule2 native host is installed (`isXModuleOcrAvailable`)
  • Scope: desktop vs browser scope may prefer different engines
  • Validation: the engine settings must be consistent (e.g. a cloud engine requires an API key; a local engine requires the XModule)

The `getOcrResponse` function reads the store, checks availability, validates settings via `guardOcrSettings`, and dispatches to the appropriate engine function (`runOCR` for cloud, `runOCRLocal` for local, or the AI OCR service).

Usage

Use this principle when an OCR system supports multiple engines and must select the right one at runtime based on user configuration and environment.

Theoretical Basis

engine=select(config,availability,scope)

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment