code wiki / _hdl_build / nx_ocr_recall_lib.nx

nx_ocr_recall_lib.nx

buildroot/runtime/_hdl_build/nx_ocr_recall_lib.nx

3824 B104 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic ocr
docsdependenciesstructsconstsfunctions

about

nx_ocr_recall_lib.nx -- the reading-recall SCORING MATH as a shared lib (single-responsibility: the CLI nx_ocr_recall.nx and the gate nx_ocr_recall_gate.nx both call ocr_recall_score, so the gate proves the EXACT code the CLI runs -- no fork/pipe harness to deadlock). Truth-token multiset recall/precision/F1, SQuAD-norm (lowercase, non-alnum->space, articles a/an/the dropped). out[0]=recall out[1]=precision out[2]=f1 out[3]=truth_tokens out[4]=ours_tokens out[5]=matched, all integer permille where a ratio. license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_ocr_recall_lib.nx nx_ocr_recall.nx nx_ocr_recall_gate.nx

imports: nx_syscalls.nx

imported by: nx_ocr_recall.nxnx_ocr_recall_gate.nx

structs

none

consts

9const ORL_CAP: i64 = 262144
10const ORL_MAXTOK: i64 = 8192

functions

12func orl_norm(src: *u8, n: i64, buf: *u8) -> i64
called by 1: ocr_recall_score
25func orl_tok(buf: *u8, n: i64, toff: *i64, tlen: *i64) -> i64
called by 1: ocr_recall_score
52func orl_eq(a: *u8, ao: i64, al: i64, b: *u8, bo: i64, bl: i64) -> i64
called by 1: ocr_recall_score
59func ocr_recall_score(truth: *u8, tn0: i64, ours: *u8, on0: i64, out: *i64) -> i64