nx_swcompare_terms.nx
buildroot/runtime/nx_swcompare_terms.nx
about
nx_swcompare_terms.nx -- AUTO-AXIS-DISCOVERY for Nishi Compare. Given a <domain>, loads the researcher-banked
frontier corpus (from <domain>.q bank names) and mechanically DISCOVERS the frontier's most-discussed phrases:
tokenize -> adjacent-word bigrams (stopword-filtered, both words >=3 chars, small gap) -> hashed frequency table
-> top-N by count. These are CANDIDATE axes surfaced straight from the 2025/26 frontier -- they feed/refine the
curated <domain>.axes so a new domain trends toward a single-file (.q) act. HONEST: this is candidate DISCOVERY
(keyword momentum has the usual extraction noise), not a finished axis list. Modes: `<domain>` = console + gate.
NOTE: no '#'/'!' in string literals (nx_cc trap). license_tier: ORIGINAL expect_exit:0
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const K_MAGIC_5381: i64 = 5381 |
| 10 | const K_MAGIC_4194304: i64 = 4194304 |
| 11 | const K_MAGIC_65536: i64 = 65536 |
| 12 | const K_MAGIC_2097152: i64 = 2097152 |
| 13 | const K_MAGIC_262144: i64 = 262144 |
functions
| 15 | func w(fd: i64, s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(fd, s, n); return 0 } |
| 16 | func wn(fd: i64, v: i64) -> i64 |
| 22 | func wr(fd: i64, buf: *u8, s: i64, e: i64) -> i64 { var i: i64 = s; while i < e { sys_write(fd, (buf as i64 + i) as *u8, 1); i = i + 1 } return 0 } |
| 23 | func c_read(path: *u8, buf: *u8, cap: i64) -> i64 |
| 29 | func c_has(buf: *u8, n: i64, needle: *u8) -> i64 called by 1: is_stop |
| 36 | func pj3(dst: *u8, a: *u8, b: *u8, c: *u8) -> i64 |
| 43 | func load_append(dst: *u8, off: i64, cap: i64, path: *u8) -> i64 |
| 49 | func load_corpus_from_q(FRONT: *u8, fcap: i64, qpath: *u8, qb: *u8, qcap: i64) -> i64 |
| 70 | func matchat(buf: *u8, i: i64, n: i64, pat: *u8, pl: i64) -> i64 { if i + pl > n { return 0 } var k: i64 = 0; while k < pl { if buf[i+k] != pat[k] { return 0 } k = k + 1 } return 1 } called by 1: extract_titles |
| 73 | func extract_titles(FRONT: *u8, FN: i64, CLEAN: *u8, ccap: i64) -> i64 |
| 86 | func is_alpha(c: u8) -> i64 { let x: i64 = c as i64; if x >= 65 { if x <= 90 { return 1 } } if x >= 97 { if x <= 122 { return 1 } } return 0 } |
| 87 | func lc(c: u8) -> i64 { let x: i64 = c as i64; if x >= 65 { if x <= 90 { return x + 32 } } return x } |
| 88 | func hash_la(buf: *u8, s: i64, e: i64) -> i64 |
| 94 | func beq(buf: *u8, s1: i64, e1: i64, s2: i64, e2: i64) -> i64 |
| 109 | func is_stop(buf: *u8, s: i64, e: i64, tmp: *u8, STOP: *u8, sl: i64) -> i64 |
| 117 | func streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 } called by 1: main |
| 118 | func wr_lower(fd: i64, buf: *u8, s: i64, e: i64) -> i64 { let t: *u8 = sys_mmap(2); var i: i64 = s; while i < e { t[0] = lc(buf[i]) as u8; sys_write(fd, t, 1); i = i + 1 } return 0 } |
| 119 | func wc(fd: i64, code: i64) -> i64 { let t: *u8 = sys_mmap(2); t[0] = code as u8; sys_write(fd, t, 1); return 0 } |
| 121 | func main(argc: i64, argv: *i64) -> i64 |