nx_writehub_score.nx
buildroot/runtime/nx_writehub_score.nx
about
nx_writehub_score.nx -- WRITING HUB shared LIB: the immune-scoring core, extracted from nx_writehub_loop so the
loop AND the self-improvement conductor share ONE scorer (consolidation -- no duplicated scoring logic, per the
operator's no-dup doctrine). Pure composition of nx_writecraft (readability) + nx_writestyle (adverb/passive/
weak/hard-sentence) -> a composite quality permil + the worst-dimension directive. No main, no I/O beyond scratch
mmap, so any organ can import it. Thresholds are heuristic consts here (move to a writehub_rubric data store
next, per nx_writestyle's own "consts -> DATA" note). license_tier: ORIGINAL module: nishi-core.writehub.score
dependencies 2 imports · 3 importers
imports: nx_writestyle.nxnx_syscalls.nx
imported by: nx_writehub_conductor.nxnx_writehub_loop.nxnx_writer_serve.nx
structs
| none |
consts
| 10 | const WHL_ADVERB_TGT: i64 = 15 // adverbs per 1000 words tolerated before penalty |
| 11 | const WHL_PASSIVE_TGT: i64 = 10 // passive constructions per 1000 words tolerated |
| 12 | const WHL_WEAK_TGT: i64 = 8 // weak qualifiers per 1000 words tolerated |
| 13 | const WHL_ADVERB_W: i64 = 6 // penalty permil per (rate-over-target)/10 |
| 14 | const WHL_PASSIVE_W: i64 = 10 |
| 15 | const WHL_WEAK_W: i64 = 8 |
| 16 | const WHL_HARD_W: i64 = 300 // penalty permil at 100% hard sentences |
| 17 | const WHL_READ_W: i64 = 80 // flat penalty when grade exceeds the band |
| 18 | const WHL_FK_MAX: i64 = 12000 // FK grade x1000 ceiling (grade ~12); above = too dense |
| 19 | const WHL_KEEP: i64 = 700 // composite permil at/above which a draft is KEPT |
functions
| 24 | func whl_eval(t: *u8, n: i64, rep: *i64) -> i64 |
| 60 | func whl_directive(worst: i64) -> *u8 |