code wiki / (root) / nx_writehub_factlib.nx

nx_writehub_factlib.nx

buildroot/runtime/nx_writehub_factlib.nx

7528 B159 linesdepth 3pulls 3 transitivereach 1 importersview sourcekind librarytopic writehub
docsdependenciesstructsconstsfunctions

about

nx_writehub_factlib.nx -- WRITING HUB shared LIB: the grounded fact-check CORE, extracted from nx_writehub_factcheck so the gate AND the live server (nx_writer_serve) share ONE implementation (no dup). Pure analysis (returns DATA, never prints): claim -> distinctive terms -> scan the banked corpus for term co-occurrence -> INDEPENDENCE-aware corroboration (composes nx_research_corroborate: distinct source-classes, echoes collapse). fcl_check fills the attesting source indices + independent-class count and returns the confidence grade (NX_CORR_CONFIRMED/SINGLE/NONE). Data-driven corpus manifest = knowledge/registry/ writehub_corpus.tsv. license_tier: ORIGINAL module: nishi-core.writehub.factlib

dependencies 2 imports · 1 importers

nx_research_corroborate.nx nx_syscalls.nx nx_writehub_factlib.nx nx_writer_serve.nx

imports: nx_research_corroborate.nxnx_syscalls.nx

imported by: nx_writer_serve.nx

structs

none

consts

10const K_MAGIC_4096: i64 = 4096

functions

12func fc_lower(c: i64) -> i64 { if c>=65 { if c<=90 { return c+32 } } return c }
13func fc_is_alpha(c: i64) -> i64 { let l: i64=fc_lower(c); if l>=97 { if l<=122 { return 1 } } return 0 }
called by 1: fc_extract calls 1: fc_lower
14func fc_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
16func fc_wordeq(claim: *u8, a: i64, b: i64, lit: *u8) -> i64
called by 1: fc_is_stop calls 1: fc_lower
22func fc_is_stop(claim: *u8, a: i64, b: i64) -> i64
called by 1: fc_extract calls 1: fc_wordeq
63func fc_extract(claim: *u8, cn: i64, termbuf: *u8, termoff: *i64, maxt: i64) -> i64
88func fc_has(hay: *u8, hn: i64, needle: *u8) -> i64
called by 1: fcl_check calls 1: fc_lower
101func fc_parse_manifest(mbuf: *u8, mn: i64, srcpath: *i64, srcclass: *i64, maxsrc: i64) -> i64
called by 1: ws_factcheck
128func fcl_check(claim: *u8, cn: i64, srcpath: *i64, srcclass: *i64, nsrc: i64, srcbuf: *u8, srccap: i64, cites: *i64, cites_max: i64, ncites: *i64, ind: *i64) -> i64