code wiki / _hdl_build / nx_doc_lexstat.nx

nx_doc_lexstat.nx

buildroot/runtime/_hdl_build/nx_doc_lexstat.nx

6806 B110 linesdepth 5pulls 10 transitivereach 0 importersview sourcekind tooltopic doc
docsdependenciesstructsconstsfunctions

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 2 imports · 0 importers

nx_docportal_search_seg.nx nx_crash.nx nx_doc_lexstat.nx

imports: nx_docportal_search_seg.nxnx_crash.nx

imported by: nobody (leaf or entry point)

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

main nx_crash_guard nxcr_mmap nxcr_install_one nxcr_mmap ↻ lx_puts dss_prefix ss_open_trace ss_open2 ss_open3 sys_now_us sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable nxa_dump_sizes sys_clock_gettime_mono sys_mmap ↻ ss_manifest_dyn ss_manifest_file_dyn sys_mmap ↻ ss_cat ss_readall sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close sys_munmap ss3_admit ss3_ann sys_mmap ↻

structs

none

consts

none

functions

14func 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
15func lx_num(v: i64) -> i64
called by 1: main
24func 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
26func main(argc: i64, argv: *i64) -> i64