code wiki / _hdl_build / nx_geo_places.nx

nx_geo_places.nx

buildroot/runtime/_hdl_build/nx_geo_places.nx

2555 B61 linesdepth 2pulls 2 transitivereach 2 importersview sourcekind librarytopic geo
docsdependenciesstructsconstsfunctions

about

nx_geo_places.nx -- LIB: GEO-021 PLACES-SEARCH (fuzzy / typo-tolerant place lookup) via sovereign Levenshtein edit distance. GEO-006 geocode does EXACT name match; this adds fuzzy ranking so "Tokio" or "Chcago" still resolve. Rides the SAME gazetteer (here a NUL-separated name list; the GEO-006 store gazetteer can be flattened into one). THE EXCEED ANGLE: deterministic integer edit-distance ranking -- the best match and its score are reproducible to the bit (no float similarity heuristic / nondeterministic tie-break). Sovereign, no search API, no data hostage. The name list is "name1\0name2\0...\0\0" (double-NUL terminated). license_tier: ORIGINAL

dependencies 1 imports · 2 importers

nx_syscalls.nx nx_geo_places.nx nx_arcade_serve.nx nx_geo_places_gate.nx

imports: nx_syscalls.nx

imported by: nx_arcade_serve.nxnx_geo_places_gate.nx

structs

none

consts

none

functions

12func geo_strlen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 1: geo_levenshtein
13func geo_min3(a: i64, b: i64, c: i64) -> i64 { var m: i64 = a; if b < m { m = b } if c < m { m = c } return m }
called by 1: geo_levenshtein
16func geo_levenshtein(a: *u8, b: *u8) -> i64
42func geo_fuzzy_best(query: *u8, namelist: *u8, out_dist: *i64, out_off: *i64) -> i64
called by 1: main calls 1: geo_levenshtein