nx_writehub_factlib.nx
buildroot/runtime/nx_writehub_factlib.nx
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
imports: nx_research_corroborate.nxnx_syscalls.nx
imported by: nx_writer_serve.nx
structs
| none |
consts
| 10 | const K_MAGIC_4096: i64 = 4096 |
functions
| 12 | func fc_lower(c: i64) -> i64 { if c>=65 { if c<=90 { return c+32 } } return c } |
| 13 | func fc_is_alpha(c: i64) -> i64 { let l: i64=fc_lower(c); if l>=97 { if l<=122 { return 1 } } return 0 } |
| 14 | func fc_strlen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 16 | func fc_wordeq(claim: *u8, a: i64, b: i64, lit: *u8) -> i64 |
| 22 | func fc_is_stop(claim: *u8, a: i64, b: i64) -> i64 |
| 63 | func fc_extract(claim: *u8, cn: i64, termbuf: *u8, termoff: *i64, maxt: i64) -> i64 |
| 88 | func fc_has(hay: *u8, hn: i64, needle: *u8) -> i64 |
| 101 | func fc_parse_manifest(mbuf: *u8, mn: i64, srcpath: *i64, srcclass: *i64, maxsrc: i64) -> i64 called by 1: ws_factcheck |
| 128 | func 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 |