Skip to content

Commit ac7fdd7

Browse files
committed
ogar-vocab: declare the tesseract-rs OCR capability surface as the authoritative action table
tesseract-rs's pure-Rust OCR transcode has no source AST to lift ActionDefs from (unlike every other producer in this workspace), so its eight capabilities (recognize_line / recognize_page / extract_text_layer / extract_page_image / render_text / render_tsv / render_hocr / render_searchable_pdf) are declared directly in a new ocr_actions module — real ActionDef values (identity/predicate/object_class/kausal) targeting the already-minted 0x08XX class_ids concepts (textline/page_image/ ocr_renderer), plus a dependency-free OcrActionParam mirror of ogar-from-schema's arago-parity ActionParam (kept local to avoid a cyclic dep, since ogar-from-schema already depends on ogar-vocab). No codebook/class_ids entries were added or changed — this table consumes the existing 0x0805/0x0808/0x0809 mints from PR #172. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016b33swuXE23hKtqxsHu9p1
1 parent 68d85f0 commit ac7fdd7

2 files changed

Lines changed: 427 additions & 0 deletions

File tree

crates/ogar-vocab/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ use serde::{Deserialize, Serialize};
3434
/// `<port>::<path>(<shape>)` grammar (`E-GRAMMAR-IS-THE-RECIPE-SHAPE`).
3535
pub mod recipe;
3636

37+
/// The tesseract-rs OCR capability surface — a hand-authored, non-`lift_*`
38+
/// [`ActionDef`] table (tesseract-rs has no source AST to extract from; see
39+
/// the module doc for why this is the authoritative action table rather
40+
/// than an extraction). Declares `recognize_line` / `recognize_page` /
41+
/// `extract_text_layer` / `extract_page_image` / `render_text` /
42+
/// `render_tsv` / `render_hocr` / `render_searchable_pdf`, each targeting a
43+
/// minted `0x08XX` [`class_ids`] concept.
44+
pub mod ocr_actions;
45+
3746
/// Source language hint — discriminates the producer for traceability
3847
/// and for emitter dispatch on Ruby/Python-specific extension shapes
3948
/// (e.g. Odoo `ComputedField`). Not a hard schema discriminator: a class

0 commit comments

Comments
 (0)