code wiki / (root) / nx_facet_classify.nx

nx_facet_classify.nx

buildroot/runtime/nx_facet_classify.nx

10093 B205 linesdepth 5pulls 7 transitivereach 5 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_facet_classify.nx -- SREACH R2: the bits-up FACET CLASSIFIER. module: nishi-core.search.bench.facet_classify depends: nx_str.nx, nx_source_tier.nx (verified host tables + ci_contains), nx_bench_intent.nx (the 7-facet model constants) capability: CORE_COMPUTE WHY: until this rung, Nishi's re-rank was handed the GOLD facet labels (oracle-from-gold) -- an honest, named leak in the leaderboard. This module derives the facet from URL/HOST/TITLE signals alone, so the reach gate runs end-to-end with NO gold leakage into ranking. The signal classes are GENERIC (path shapes, host classes from the research-verified tier tables, title keywords), not per-document rules -- the gate (nx_facet_gate) measures honest agreement vs gold at a permil bar instead of asserting it. Signal order IS the policy (first match wins; one table per facet, Rule #11): SELF_SOCIAL own-platform profile hosts (instagram/x/threads/onlyfans/...) OFFICIAL_MEDIA first-hand photo/still archives (getty/wikimedia-commons/ap) INTERVIEWS direct-statement signals in title/path (interview/chats/podcast) WORKS the work's own record page (/title/ catalog paths) IDENTITY canonical bio records (wikipedia /wiki/, wikidata, imdb /name/, /person/ catalog paths, kid-encyclopedia) PRESS professional NEWS-press hosts (the tier table's editorial outlets minus aggregator CATALOGS -- TMDB/RottenTomatoes/ Fandango are catalogs, not press; lad-mag galleries are derivative media, not reporting) LONGTAIL everything else (net-worth/measurement SEO, fan cuts, wallpapers, community wikis) -- the honest default.

dependencies 4 imports · 3 importers

fx.nx nx_str.nx nx_source_tier.nx nx_bench_intent.nx nx_facet_classify.nx nx_bench_harness.nx nx_diora_leaderboard.nx nx_facet_gate.nx

imports: fx.nxnx_str.nxnx_source_tier.nxnx_bench_intent.nx

imported by: nx_bench_harness.nxnx_diora_leaderboard.nxnx_facet_gate.nx

structs

none

consts

167const NX_CONTENT_MEDIA_BOOST_NUM: i64 = 1 // +1/5 for photo/video-rich titles
168const NX_CONTENT_MEDIA_BOOST_DEN: i64 = 5

functions

39func nx_facet_host_has(url: *u8, dom: *u8) -> i64
66func nx_facet_is_social_host(url: *u8) -> i64
79func nx_facet_is_media_host(url: *u8) -> i64
88func nx_facet_is_interview(url: *u8, title: *u8) -> i64
97func nx_facet_is_identity(url: *u8) -> i64
114func nx_facet_is_press_host(url: *u8) -> i64
134func nx_facet_classify(url: *u8, title: *u8) -> i64
145func nx_facet_name(f: i64) -> *u8
170func nx_facet_content_base(facet: i64) -> i64
190func nx_facet_content_value(url: *u8, title: *u8, facet: i64) -> i64