nx_content_measure.nx
buildroot/runtime/nx_content_measure.nx
about
nx_content_measure.nx -- MEASURED content value (SREACH R3c-a).
module: nishi-core.search.content_measure
depends: fx.nx (Q16.16)
capability: CORE_COMPUTE
The operator's content-accessibility directive (engagement: media-heavy +
information-dense pages), MEASURED from the fetched bytes instead of
inferred from a facet label: a page earns its content score from what it
actually serves. Two components, equal weight (the directive names BOTH
"media sites" and "heavy information sites"):
TEXT -- extracted-text length, bucketed (Rule #11 table; thresholds from
the live corpus we crawl: JS shells ~10-300 chars, stubs ~1k,
real articles 4k+)
MEDIA -- <img/<video/<audio tag count in the HTML, bucketed (galleries
10+, illustrated pages 4-10, token imagery 1-3)
score = (text_component + media_component) / 2, Q16.16 in [0,1].
KATs: nx_content_measure_test.nx. Replaces facet-INFERRED value at the
live layer; the bench facet table stays for corpus-less scoring.
dependencies 1 imports · 2 importers
imports: fx.nx
imported by: nx_content_measure_test.nxnx_entity_discover.nx
structs
| none |
consts
| 22 | const K_MAGIC_4000: i64 = 4000 |
functions
| 24 | func cm_lc(c: i64) -> i64 { if c >= 0x41 { if c <= 0x5A { return c + 0x20 } } return c } called by 1: cm_count |
| 27 | func cm_count(html: *u8, n: i64, needle: *u8) -> i64 |
| 45 | func nx_content_media_count(html: *u8, n: i64) -> i64 |
| 54 | func nx_content_text_component(textlen: i64) -> i64 |
| 63 | func nx_content_media_component(media: i64) -> i64 |
| 71 | func nx_content_measure(html: *u8, hlen: i64, textlen: i64) -> i64 called by 2: ct_casemain calls 3: nx_content_text_componentnx_content_media_componentnx_content_media_count |