code wiki / _hdl_build / nx_mt_multi.nx

nx_mt_multi.nx

buildroot/runtime/_hdl_build/nx_mt_multi.nx

6963 B144 linesdepth 2pulls 2 transitivereach 14 importersview sourcekind librarytopic mt
docsdependenciesstructsconstsfunctions

about

nx_mt_multi.nx -- sovereign MULTILINGUAL phrase translator over EN/RU/BE/UK/PL, ENGLISH-PIVOT (the standard MT design: any pair X->Y routes X->EN->Y, so N languages need only 2N tables, not N^2). Token-level, Cyrillic- & Polish-aware tokenizer (bytes >=0x80 are token chars), NO float, deterministic. Unknown tokens pass through (Cardinal 25). Lexicon is edit-here R1 (R2 -> seg_store per language-pair, Cardinal 11). license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_mt_multi.nx nx_connect_api_lib.nx nx_connect_serve.nx nx_connect_translate.nx nx_multilang_call_gate.nx

imports: nx_syscalls.nx

imported by: nx_connect_api_lib.nxnx_connect_serve.nxnx_connect_translate.nxnx_multilang_call_gate.nx

structs

none

consts

7const MM_EN: i64 = 0
8const MM_RU: i64 = 1
9const MM_BE: i64 = 2
10const MM_UK: i64 = 3
11const MM_PL: i64 = 4

functions

13func mm_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c }
called by 1: mm_extract
14func mm_is_tok(c: i64) -> i64
called by 1: nx_multi_translate
22func mm_streq(a: *u8, b: *u8) -> i64
called by 2: mm_en_tomm_to_en
29func mm_extract(src: *u8, s: i64, e: i64, buf: *u8) -> i64
called by 1: nx_multi_translate calls 1: mm_lc
37func mm_en_to(lang: i64, tok: *u8) -> *u8
called by 1: mm_xlate_token calls 1: mm_streq
73func mm_to_en(lang: i64, tok: *u8) -> *u8
called by 1: mm_xlate_token calls 1: mm_streq
109func mm_xlate_token(tok: *u8, srcLang: i64, dstLang: i64) -> *u8
called by 1: nx_multi_translate calls 2: mm_en_tomm_to_en
117func mm_app(dst: *u8, pos: *i64, cap: i64, s: *u8) -> i64
called by 1: nx_multi_translate
122func mm_appb(dst: *u8, pos: *i64, cap: i64, b: i64) -> i64 { let p: i64 = *pos; if p < cap { dst[p]=b as u8; *pos=p+1 } return 0 }
called by 1: nx_multi_translate
125func nx_multi_translate(src: *u8, n: i64, srcLang: i64, dstLang: i64, dst: *u8, cap: i64) -> i64