code wiki / _hdl_build / nx_food_recipe_mine.nx

nx_food_recipe_mine.nx

buildroot/runtime/_hdl_build/nx_food_recipe_mine.nx

4960 B126 linesdepth 5pulls 6 transitivereach 3 importersview sourcekind librarytopic food
docsdependenciesstructsconstsfunctions

about

nx_food_recipe_mine.nx -- LIB: GROUND the engine's pairings in real recipes (R-RECIPE). Mines the license-clean fetched corpora (Wikibooks/Wikisource/Wikipedia recipe + the Nature food-pairing paper) for INGREDIENT CO-OCCURRENCE -- the food-pairing-hypothesis signal: ingredients that appear together in real recipe/research text pair well. Method: split a corpus into fixed passages; within a passage, mark which KNOWN ingredients (matched by lowercased display name, word-boundary-anchored) are present; every co-present pair scores +1. FACTS-ONLY (only known ingredient tokens are ever recorded, never prose) and LICENSE-GATED (callers pass only fd_source_admissible corpora). Promotes the counts into food:pairlearned:<a>:<b> records, provenance-distinct from the v1 seed (food:pair:*) so learned-vs-seeded stays auditable. license_tier: ORIGINAL

dependencies 4 imports · 2 importers

nx_food_science.nx nx_food_provenance.nx nx_seg_store.nx nx_syscalls.nx nx_food_recipe_mine.nx nx_food_recipe_gate.nx nx_perma_mine.nx

imports: nx_food_science.nxnx_food_provenance.nxnx_seg_store.nxnx_syscalls.nx

imported by: nx_food_recipe_gate.nxnx_perma_mine.nx

structs

none

consts

none

functions

15func fm_lower(buf: *u8, n: i64) -> i64
27func fm_passage_has(c: *u8, ws: i64, we: i64, term: *u8, tl: i64) -> i64
called by 1: fm_mine
47func fm_mine(world: *i64, c: *u8, clen: i64, window: i64, termlc: *i64, termlen: *i64, cooc: *i64, pres: *i64) -> i64
called by 2: mainmain calls 1: fm_passage_has
75func fm_cooc(cooc: *i64, n: i64, i: i64, j: i64) -> i64 { return cooc[i * n + j] }
78func fm_build_terms(world: *i64, termlc: *i64, termlen: *i64) -> i64
called by 2: mainmain calls 2: sys_mmapfm_lower
98func fm_promote(prefix: *u8, world: *i64, cooc: *i64) -> i64