nx_doc_extract.nx
buildroot/runtime/nx_doc_extract.nx
about
nx_doc_extract.nx -- R1 of THE NISHI DOCUMENT-INTELLIGENCE arc: READ a document's text into STRUCTURED
DATA. The "consuming documents -> structured data" leg (the other leg, making documents, is nx_fin_dispute
/ the emitters). Sovereign + deterministic: a tolerant line/field parser (no OCR/ML dependency) that turns
an itemized medical-bill statement into structured line-items (date, CPT code, units, billed cents) that
flow straight into nx_fin_audit -- so a scanned/typed bill becomes auditable structured data with ZERO
manual entry. This is the format-specific deterministic rung; the research corpus (knowledge/fetched/
doc_*.raw: layout-analysis, IE, NER, classification) grounds the roadmap to arbitrary-layout + classified
extraction. A line is a line-item iff it begins with a MM/DD/YYYY date AND carries a 5-digit code AND a
$amount; headers/totals/blank lines are skipped by construction. No floats (exact cents), no hardware
writes. license_tier: ORIGINAL
dependencies 1 imports · 3 importers
imports: nx_syscalls.nx
imported by: nx_climbout_docs.nxnx_doc_classify_gate.nxnx_doc_extract_gate.nx
structs
| none |
consts
| none |
functions
| 14 | func dx_dig(c: i64) -> i64 |
| 21 | func dx_tok_date(line: *u8, s: i64, l: i64) -> i64 |
| 44 | func dx_tok_int(line: *u8, s: i64, l: i64) -> i64 |
| 58 | func dx_is5(line: *u8, s: i64, l: i64) -> i64 |
| 66 | func dx_tok_money(line: *u8, s: i64, l: i64) -> i64 |
| 95 | func dx_tokenize(line: *u8, lstart: i64, llen: i64, tstart: *i64, tlen: *i64, cap: i64) -> i64 called by 1: dx_extract_bill |
| 117 | func dx_extract_bill(text: *u8, n: i64, out_codes: *i64, out_dates: *i64, out_units: *i64, out_billed: *i64, cap: i64) -> i64 called by 3: cor_recover_from_billmainmain calls 6: sys_mmapdx_tokenizedx_tok_datedx_is5dx_tok_intdx_tok_money |