code wiki / _hdl_build / nx_mt_multi.nx
nx_mt_multi.nx
buildroot/runtime/_hdl_build/nx_mt_multi.nx
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
imports: nx_syscalls.nx
imported by: nx_connect_api_lib.nxnx_connect_serve.nxnx_connect_translate.nxnx_multilang_call_gate.nx
structs
| none |
consts
| 7 | const MM_EN: i64 = 0 |
| 8 | const MM_RU: i64 = 1 |
| 9 | const MM_BE: i64 = 2 |
| 10 | const MM_UK: i64 = 3 |
| 11 | const MM_PL: i64 = 4 |
functions
| 13 | func mm_lc(c: i64) -> i64 { if c >= 65 { if c <= 90 { return c + 32 } } return c } called by 1: mm_extract |
| 14 | func mm_is_tok(c: i64) -> i64 called by 1: nx_multi_translate |
| 22 | func mm_streq(a: *u8, b: *u8) -> i64 |
| 29 | func mm_extract(src: *u8, s: i64, e: i64, buf: *u8) -> i64 |
| 37 | func mm_en_to(lang: i64, tok: *u8) -> *u8 |
| 73 | func mm_to_en(lang: i64, tok: *u8) -> *u8 |
| 109 | func mm_xlate_token(tok: *u8, srcLang: i64, dstLang: i64) -> *u8 |
| 117 | func mm_app(dst: *u8, pos: *i64, cap: i64, s: *u8) -> i64 called by 1: nx_multi_translate |
| 122 | func 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 |
| 125 | func nx_multi_translate(src: *u8, n: i64, srcLang: i64, dstLang: i64, dst: *u8, cap: i64) -> i64 |