code wiki / _hdl_build / nx_stem.nx
nx_stem.nx
buildroot/runtime/_hdl_build/nx_stem.nx
about
nx_stem.nx -- SOVEREIGN morphological stemming (the stemming/lemmatization SOTA-parity rung; sota_stemming
canon). Inflected forms map to a common conflation root so a query recalls all forms: run/running/runs,
rank/ranking/ranked, index/indexes/indexing. Upgraded 2026-07-03 from Step-1a-only to a PORTER-LITE stemmer
(the high-recall steps: plurals + -ed/-ing + -ly + common derivational suffixes) with Porter's measure(m)
guard that stops over-stemming short words. NO index-format change: it drives QUERY-TIME dictionary
expansion (dss_stem_expand), so indexing is untouched. HONEST SCOPE: no irregulars (children->child needs a
lexicon). exports: nx_stem (buffered) + vr_stem (in-place, backward-compat). license_tier: ORIGINAL
dependencies 1 imports · 2 importers
imports: nx_syscalls.nx
imported by: nx_docportal_search_seg.nxnx_stem_gate.nx
structs
| none |
consts
| none |
functions
| 10 | func stm_isvowel(c: u8, prev: u8) -> i64 |
| 24 | func stm_measure(s: *u8, n: i64) -> i64 |
| 38 | func stm_hasvowel(s: *u8, n: i64) -> i64 |
| 44 | func stm_ends(s: *u8, n: i64, suf: *u8, sl: i64) -> i64 called by 1: nx_stem |
| 50 | func stm_dbl_consonant_end(s: *u8, n: i64) -> i64 |
| 56 | func stm_cvc(s: *u8, n: i64) -> i64 |
| 69 | func nx_stem(inp: *u8, n0: i64, out: *u8) -> i64 called by 2: dss_stem_expandvr_stem calls 5: stm_endsstm_measurestm_hasvowelstm_dbl_consonant_endstm_cvc |
| 127 | func vr_stem(w: *u8, n: i64) -> i64 |