code wiki / (root) / nx_bm25_gate.nx

nx_bm25_gate.nx

buildroot/runtime/nx_bm25_gate.nx

7927 B114 linesdepth 9pulls 16 transitivereach 0 importersview sourcekind gate/prooftopic bm25
docsdependenciesstructsconstsfunctions

about

nx_bm25_gate.nx -- INDEPENDENT GATE: integer BM25 + Reciprocal Rank Fusion, on real clause text. The teeth: u2605IDF EARNS ITS KEEP: a term appearing in EVERY document scores ZERO, so filler cannot win. A term in ONE document of four scores high -- which is how a rare defined term beats common vocabulary. u2605SATURATION: doubling term frequency does NOT double the score (k1), so keyword stuffing fails. u2605LENGTH NORMALISATION: the same term count in a longer document scores LOWER (b). u2605u2605RRF FUSES RANKS, NOT SCORES: a document ranked 1st by ONE leg beats a document ranked mid-pack by BOTH -- and an UNRANKED leg contributes nothing rather than a fabricated worst place. u2605NO FLOAT: exact at powers of two, deterministic everywhere. license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0

dependencies 2 imports · 0 importers

nx_bm25_lib.nx nx_gate_verdict.nx nx_bm25_gate.nx

imports: nx_bm25_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr 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 sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ gv_check gv_puts ↻ bm_log2_milli bm_log2_floor bm_ln_milli bm_log2_milli ↻ bm_idf_milli bm_ln_of_milli bm_log2_milli ↻ bm_tf cl_word_at cl_is_word cl_lower bm_df cl_has_word cl_word_at ↻ mt_streq bm_avgdl bm_doclen cl_word_count

structs

none

consts

none

functions

15func main(argc: i64, argv: *i64) -> i64