emon_ocr_tesseract

Tesseract OCR for emon: the adapter library (libemon_ocr_tesseract), fetched for the target by a build hook, and its language packs on demand.

The adapter library bundles by default on Linux. On other platforms, enable it with hooks.user_defines.emon_ocr_tesseract.bundle: true in the app's pubspec.yaml. The engine needs the model packs tess-fast-eng and tess-osd for English text and orientation detection. Emon fetches the applicable language data when a conversion asks for it.

Part of emon. Depends only on emon_core; most apps use the turnkey emon (or emon_flutter), which chooses adapters for the platform.

import 'package:emon_core/emon_core.dart';
import 'package:emon_ocr_tesseract/emon_ocr_tesseract.dart';

final emon = await Emon.open(nativeAdapters: [tesseractAdapter()], packMode: PackMode.auto);

The build hook downloads the library for the target from the GitHub release of the same version and checks its SHA-256 against a table in the package. In a checkout, point it at a local directory of archives (bb package --host c): hooks: user_defines: emon_ocr_tesseract: native_dir: <dir> in the pubspec of the app.

Libraries

emon_ocr_tesseract
Tesseract for emon.