code wiki / (root) / nx_absa_seqextract.nx

nx_absa_seqextract.nx

buildroot/runtime/nx_absa_seqextract.nx

9424 B163 linesdepth 7pulls 17 transitivereach 0 importersview sourcekind tooltopic absa
docsdependenciesstructsconstsfunctions

about

nx_absa_seqextract.nx -- rung IM28: train the averaged structured perceptron (nx_absa_seq) on a SemEval TRAIN split and score aspect-term extraction on the TEST split. ONE call: nx_absa_seqextract <train.seg> <test.seg> [label] Prints P, R and F1 in permil with the counts beside the published winners, so the distance to SOTA is visible. license_tier: ORIGINAL No hw writes (Rule 26).

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_reviewmine_lib.nx nx_absa_lib.nx nx_absa_seq.nx nx_absa_seqextract.nx

imports: nx_syscalls.nxnx_reviewmine_lib.nxnx_absa_lib.nxnx_absa_seq.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 sp_set_treebank sp_set_parse sp_set_shuffle sp_set_clusters sp_set_crf sp_set_embed 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 ↻ sp_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

structs

none

consts

11const SE_ARG_TRAIN: i64 = 1
12const SE_ARG_TEST: i64 = 2
13const SE_ARG_LABEL: i64 = 3
14const SE_ARG_TREEBANK: i64 = 4 // optional: a CoNLL-U treebank -> POS and parse features on
15const SE_ARG_MODE: i64 = 5 // optional: parse -> add the parser's features on top of the tagger (off by default,
17const SE_MODE_PARSE: *u8 = "parse"
18const SE_MODE_PARSE_LEN: i64 = 5
19const SE_MODE_NOPARSE: *u8 = "noparse"
20const SE_MODE_NOPARSE_LEN: i64 = 7
21const SE_MODE_SHUFFLE: *u8 = "shuffle" // per-epoch shuffle of the training groups (off by default: measured a non-result)
22const SE_MODE_SHUFFLE_LEN: i64 = 7
23const SE_MODE_CLUSTERS: *u8 = "clusters" // PPMI word-cluster features from the estate's own model (off until measured)
24const SE_MODE_CLUSTERS_LEN: i64 = 8
25const SE_CLUST_MODEL: *u8 = "knowledge/index/semppmi_v1.bin" // the ONE PPMI model nx_semppmi_build maintains
26const SE_MODE_CRF: *u8 = "crf" // the conditional log-likelihood objective (off until measured)
27const SE_MODE_CRF_LEN: i64 = 3
28const SE_MODE_EMBED: *u8 = "embed" // dense embedding coordinate features from the estate's own table (off until measured)
29const SE_MODE_EMBED_LEN: i64 = 5
30const SE_EMB_MODEL: *u8 = "knowledge/index/embed_v1.bin" // the ONE embedding table nx_embed_train writes
31const SE_EXIT_USAGE: i64 = 2
32const SE_EXIT_NOGOLD: i64 = 3
33const SE_WIN_REST: i64 = 840 // DLIREC 84.01
34const SE_WIN_LAP: i64 = 745 // IHS RD 74.55

functions

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