code wiki / (root) / nx_ocr_assemble.nx

nx_ocr_assemble.nx

buildroot/runtime/nx_ocr_assemble.nx

3410 B85 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic ocr
docsdependenciesstructsconstsfunctions

about

nx_ocr_assemble.nx -- R5 of the sovereign scanning stack: recognized glyphs -> text. Groups glyphs into lines by vertical overlap, orders each line left-to-right, inserts a space where the horizontal gap is wide, and breaks lines top-to-bottom -> a plain text string. That text is what feeds nx_money_ledger extraction -> money-OS, closing the loop: scanned document -> recognized text -> the money system. Integer-exact, zero deps. Each glyph is [minx, miny, maxx, maxy, char]. license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_ocr_assemble.nx nx_ocr_assemble_gate.nx

imports: nx_syscalls.nx

imported by: nx_ocr_assemble_gate.nx

structs

none

consts

8const GLYPH_MINX: i64 = 0
9const GLYPH_MINY: i64 = 1
10const GLYPH_MAXX: i64 = 2
11const GLYPH_MAXY: i64 = 3
12const GLYPH_CHAR: i64 = 4
13const GLYPH_FIELDS: i64 = 5

functions

16func asm_assemble(glyphs: *i64, ng: i64, space_gap: i64, out: *u8) -> i64
called by 1: main calls 1: sys_mmap