code wiki / _hdl_build / nx_xlate_mt_gate.nx

nx_xlate_mt_gate.nx

buildroot/runtime/_hdl_build/nx_xlate_mt_gate.nx

7886 B175 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic xlate
docsdependenciesstructsconstsfunctions

about

nx_xlate_mt_gate.nx -- MEASURES the data-driven RU<->EN engine on a HELD-OUT test set. NO fake green: loads knowledge/xlate/{xlate_lex.tsv, xlate_morph_ru.tsv, xlate_testset.tsv}, builds the engine, translates every held-out sentence, and reports unigram PRECISION + RECALL (clipped, per-mille integer, no float) and EXACT-match count -- then re-scores the SAME set through the OLD 16-word nx_ruen_translate stub to prove the leap. verdict GREEN iff the new engine's unigram precision >= 300 per-mille AND strictly beats the old stub.

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_xlate_mt.nx nx_mt_ruen.nx nx_xlate_mt_gate.nx

imports: nx_syscalls.nxnx_xlate_mt.nxnx_mt_ruen.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main g_puts sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_exit xl_build sys_mmap ↻ xl_field xl_norm_phrase xl_is_tok xl_putb xl_norm_tok xl_putb ↻ sys_munmap g_num sys_write ↻ sys_mmap ↻ sys_munmap ↻ g_field g_score sys_mmap ↻ nx_ruen_translate sys_mmap ↻ mr_is_tok mr_appb mr_ru_for_en mr_eq_ci mr_lc mr_en_for_ru mr_eq_exact mr_app xl_translate sys_mmap ↻ xl_norm_str

structs

none

consts

none

functions

10func g_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
called by 2: g_reportmain calls 1: sys_write
11func g_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
12func g_num(v: i64) -> i64
24func g_norm(src: *u8, n: i64, buf: *u8, cap: i64) -> i64
32func g_toks(buf: *u8, n: i64, off: *i64, len: *i64, maxt: i64) -> i64
called by 1: g_score
45func g_teq(b1: *u8, a: i64, la: i64, b2: *u8, bb: i64, lb: i64) -> i64
called by 1: g_score
52func g_field(buf: *u8, n: i64, ip: *i64, fs: *i64, fe: *i64, term: *i64) -> i64
called by 1: main
68func g_score(eng: *i64, src: *u8, srcn: i64, dir: i64, gold: *u8, goldn: i64, use_old: i64, acc: *i64) -> i64
109func g_report(name: *u8, acc: *i64, ntest: i64) -> i64
called by 1: main calls 2: g_putsg_num
118func main() -> i64