code wiki / _hdl_build / nx_food_recipe_mine.nx
nx_food_recipe_mine.nx
buildroot/runtime/_hdl_build/nx_food_recipe_mine.nx
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
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
| 15 | func fm_lower(buf: *u8, n: i64) -> i64 |
| 27 | func fm_passage_has(c: *u8, ws: i64, we: i64, term: *u8, tl: i64) -> i64 called by 1: fm_mine |
| 47 | func fm_mine(world: *i64, c: *u8, clen: i64, window: i64, termlc: *i64, termlen: *i64, cooc: *i64, pres: *i64) -> i64 |
| 75 | func fm_cooc(cooc: *i64, n: i64, i: i64, j: i64) -> i64 { return cooc[i * n + j] } |
| 78 | func fm_build_terms(world: *i64, termlc: *i64, termlen: *i64) -> i64 |
| 98 | func fm_promote(prefix: *u8, world: *i64, cooc: *i64) -> i64 |