code wiki / _hdl_build / nx_doc_lexstat.nx
nx_doc_lexstat.nx
buildroot/runtime/_hdl_build/nx_doc_lexstat.nx
about
nx_doc_lexstat.nx -- MEASUREMENT PROBE for the keyword-stuffing penalty design (2026-08-04, debt
1785895889): for each <cid> argument, walk the stored doc EXACTLY as serve pass-1 does (same
tokenizer, same DSS_TFSCAN cap) and print the statistics the penalty would ride on: token count,
per-term tf for the probe terms, and max-term density (tf*1024/tokens). Read-only; no ranking change.
usage: nx_doc_lexstat <domain> <term1> <term2> <cid>...
license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_docportal_search_seg.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
| none |
functions
| 9 | func lx_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 1: main |
| 10 | func lx_num(v: i64) -> i64 called by 1: main |
| 19 | func lx_atoi(s: *u8) -> i64 { var v: i64 = 0; var i: i64 = 0; while s[i] != (0 as u8) { let c: i64 = s[i] as i64; if c >= 48 { if c <= 57 { v = v * 10 + (c - 48) } } i = i + 1 } return v } called by 1: main |
| 21 | func main(argc: i64, argv: *i64) -> i64 |