Modern Apps git
git clone https://git.maproj.org/Modern-Apps.git
translate ▾

Modern-Apps.git / library / ocr / AGENTS.md

AGENTS.md1.1 KiBRenderedCodeRaw
1# AGENTS.md — library/ocr/ (':library:ocr')
2
3> Scoped supplement. Global rules in root `AGENTS.md` apply. Stay inside `library/ocr/` + allowed shared modules. Do not root-scan.
4
5- Gradle: :library:ocr / dir: library/ocr/
6- Package roots present: (on-device OCR — one package)
7- Entry files: OcrEngine.kt (no MainActivity/Route — library)
8- Deps: :library:ml (both permission-free; the OCR pipeline runs on the ml runtime)
9- Metadata: metadata_data/library-ocr.md (absent — libraries have none by design)
10- Rust: no / screenshotTest: no
11
12## Overview
13**Purpose:** On-device OCR engine over `:library:ml` runtimes. Used by translate (camera overlay) and any image-text extraction.
14**How to use:** `OcrEngine` in, text + boxes out; post-processing via `:library:ml` `OcrPost`/`TextRecognizer`.
15**Entry points:** `OcrEngine.kt`.
16**Gotchas:** Model files are large — first-run gating via `:library:downloadservice`, never block the camera path on a missing model.
17
18## Key files
19- com/vayunmathur/library/ocr/OcrEngine.kt
20
21## Verify (this module only)
22```
23./gradlew :library:ocr:compileDevKotlin
24./gradlew :library:ocr:lint
25```