code wiki / (root) / nx_absa_bench_gate.nx

nx_absa_bench_gate.nx

buildroot/runtime/nx_absa_bench_gate.nx

15435 B221 linesdepth 4pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic absa
docsdependenciesstructsconstsfunctions

about

nx_absa_bench_gate.nx -- GATE for the SemEval-2014 SB1 scorer in nx_absa_lib (intelmine IM17), driven IN-PROCESS on a planted gold set under /tmp/nx_absa_bench_gate. The load-bearing proof is the F1 arithmetic (ab_prf) checked at exact permil values including the ZERO-PREDICTION control the rung's done-rule names; the gold parser is proven to dedupe distinct terms and to survive CRLF; the normaliser is proven case- and whitespace-insensitive; a multi-word gold term is proven UNMATCHABLE by a unigram (the honest weakness); and the full ab_eval pipeline is proven non-vacuous on the planted gold. Every fixture asserts its own condition before any outcome is judged. No network. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_gatekit_lib.nx nx_reviewmine_lib.nx nx_absa_lib.nx nx_gate_verdict.nx nx_absa_bench_gate.nx

imports: nx_syscalls.nxnx_gatekit_lib.nxnx_reviewmine_lib.nxnx_absa_lib.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main gv_head gv_puts sys_write gv_ctr sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gk_mkdir sys_mkdir gk_write sys_openat_wr gk_len gk_write_all sys_write ↻ sys_close sys_mmap ↻ g_crlf gv_need gv_puts ↻ gk_exists sys_openat_rd sys_close ↻ gv_check_eq gv_check gv_puts ↻ gv_puts ↻ gv_num

structs

none

consts

14const G_ROOT: *u8 = "/tmp/nx_absa_bench_gate"
15const G_GOLD: *u8 = "/tmp/nx_absa_bench_gate/gold.seg"
16const G_GOLDCRLF: *u8 = "/tmp/nx_absa_bench_gate/goldcrlf.seg"
17const G_I64: i64 = 8
18const G_LINES: i64 = 12 // four three-line records
19const G_NG: i64 = 3 // distinct terms: food, service, hard disk (food appears twice)
20const G_LF: i64 = 10
21const G_CR: i64 = 13
22const G_CRLF_CAP: i64 = 512
24const G_LEXDIR: *u8 = "/tmp/nx_absa_bench_gate/lex/"
25const G_NOLEXDIR: *u8 = "/tmp/nx_absa_bench_gate/nolex/"
26const G_LEX_DEFECT: *u8 = "/tmp/nx_absa_bench_gate/lex/lexicon_defect.conf"
27const G_LEX_NOTMEET: *u8 = "/tmp/nx_absa_bench_gate/lex/lexicon_notmeet.conf"
28const G_LEX_EXCEED: *u8 = "/tmp/nx_absa_bench_gate/lex/lexicon_exceed.conf"
29const G_ABSENT_GOLD: *u8 = "/tmp/nx_absa_bench_gate/absent.seg"
30const G_RECORDS: i64 = 4
31const G_LEX_TERMS: i64 = 5 // slow, noisy (defect) + refund (not met) + great, fast (exceed)
34const G_GOLD_NG: *u8 = "/tmp/nx_absa_bench_gate/gold_ng.seg"
35const G_ROWS_NG: *u8 = "The $T$ was great .\nfood\n1\nThe $T$ is slow .\nservice\n-1\nThe $T$ is noisy .\nhard disk\n0\nGreat $T$ here .\nfood\n1\nThe $T$ is loud .\nhard disk\n-1\n"
36const G_NG_LINES: i64 = 15
37const G_NG_RECORDS: i64 = 5
38const G_NG_MINSUP: i64 = 2 // pins support at the bigram's frequency
39const G_NG_MINSUP_ABOVE: i64 = 3 // one above it: the control that must find no frequent bigram
40const G_NG_CANDS: i64 = 3 // hard disk, food, great
41const G_NG_PRUNED: i64 = 2 // hard, disk
42const G_TRAIN: *u8 = "/tmp/nx_absa_bench_gate/train.seg"
43const G_TEST: *u8 = "/tmp/nx_absa_bench_gate/test.seg"
44const G_TRAIN_ROWS: *u8 = "The $T$ was slow .\nfood\n1\nThe $T$ is rude .\nservice\n-1\nThe $T$ is noisy .\nhard disk\n0\nThe $T$ is nice .\nkeyboard\n1\n"
45const G_TEST_ROWS: *u8 = "The $T$ was great .\nfood\n1\nThe $T$ is noisy .\nhard disk\n0\nThe $T$ broke .\nmouse\n-1\nI like the keyboard and $T$ .\nfood\n1\n"
46const G_D_DICT: i64 = 4
47const G_D_RECORDS: i64 = 4
48const G_D_NG: i64 = 3
49const G_D_PRED: i64 = 3
50const G_D_INTER: i64 = 2
52const G_ROWS: *u8 = "The $T$ was great .\nfood\n1\nThe $T$ is slow .\nservice\n-1\nThe $T$ is noisy .\nhard disk\n0\nGreat $T$ here .\nfood\n1\n"

functions

54func g_lines(path: *u8) -> i64
called by 1: main calls 2: sys_mmapsys_read_file
65func g_crlf(src: *u8, out: *u8) -> i64
called by 1: main
77func main() -> i64