code wiki / (root) / nx_absa_bench.nx

nx_absa_bench.nx

buildroot/runtime/nx_absa_bench.nx

7380 B125 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind benchtopic absa
docsdependenciesstructsconstsfunctions

about

nx_absa_bench.nx -- score the estate's unigram frequency baseline for aspect-term extraction against the SemEval-2014 Task 4 subtask-1 gold (the pre-declared oracle for intelmine, rung IM17). ONE call: nx_absa_bench <gold.seg> [k] [domain-label] It composes nx_absa_lib (the scorer) which composes nx_reviewmine_lib (the ONE tokenizer and frequency ranker). It prints P, R and F1 in permil with the counts, then the PUBLISHED winning F1s read from the mirrored, pinned paper (knowledge/fetched/cmp_intelmine_semeval14_paper.pdf, Table 4) so the gap is visible: this is a weak unigram baseline, not a SemEval submission, and the gap is the un-landed rm_aspects rung. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_reviewmine_lib.nx nx_absa_lib.nx nx_absa_bench.nx

imports: nx_syscalls.nxnx_reviewmine_lib.nxnx_absa_lib.nx

imported by: nobody (leaf or entry point)

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

main rm_w sys_write rm_slen sys_exit rm_atoi 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 ↻ ab_eval ab_gold_load ab_set_reset sys_mmap ↻ sys_mmap ↻ sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close rm_line_end ab_set_add_raw ab_norm ab_set_add_norm rm_hash rm_catn ab_set_count

structs

none

consts

13const BENCH_ARG_GOLD: i64 = 1
14const BENCH_ARG_K: i64 = 2
15const BENCH_ARG_LABEL: i64 = 3
16const BENCH_ARG_TRAIN: i64 = 4 // the TRAIN split for the supervised dictionary arm (optional)
17const BENCH_K_DEFAULT: i64 = 0 // 0 -> K = |G| (balanced baseline)
18const BENCH_EXIT_USAGE: i64 = 2
19const BENCH_EXIT_NOGOLD: i64 = 3
22const BENCH_WIN_REST: i64 = 840 // DLIREC 84.01 (restaurants, best)
23const BENCH_WIN_LAP: i64 = 745 // IHS RD 74.55 (laptops, best)
24const BENCH_BASE_REST: i64 = 471 // organisers dictionary baseline 47.15 (restaurants)
25const BENCH_BASE_LAP: i64 = 356 // organisers dictionary baseline 35.64 (laptops)
27const BENCH_SB2_WIN_REST: i64 = 809 // DCU 80.95 (restaurants, best)
28const BENCH_SB2_WIN_LAP: i64 = 704 // DCU and NRC-Canada 70.48 (laptops, best)
29const BENCH_SB2_BASE_REST: i64 = 642 // organisers baseline 64.28
30const BENCH_SB2_BASE_LAP: i64 = 513 // organisers baseline 51.37
31const BENCH_SB2_MAJ_REST: i64 = 641 // majority 64.19
32const BENCH_SB2_MAJ_LAP: i64 = 521 // majority 52.14

functions

34func main(argc: i64, argv: *i64) -> i64