Mova0.6 pre-release

witness-sweep — open GPU parsers over seeded samples, and the agreer

witness-sweep runs the open neural parsers (Open parsers: witnesses and tests) over seeded random samples of many languages, one bounded group at a time, and turns their outputs into witnesses for Mova's multilingual parser: per-group measurements, label profiles against UD 2.19, and the agreer with two outputs kept apart (agreement for measurement over all parsers, silver CoNLL-U for training over the licence-clean parsers only).

cargo build --release -p witness-sweep
witness-sweep sweep PLAN [--langs a,b] [--parsers x,y]   # samples, then every group not yet done
witness-sweep score PLAN                                  # measure/: throughput, GPU, UAS/LAS, pairwise agreement
witness-sweep profile PLAN                                # labels/: each parser's labels against UD 2.19
witness-sweep evidence PLAN                               # labels/evidence.tsv: gold labels behind each parser label (even dev sentences)
witness-sweep agree PLAN [--langs a,b]                    # agree/: measurement and silver outputs, controls
witness-sweep report PLAN                                 # measure/report.tsv: one row per parser and language

The plan

A JSON file: run_dir, stop (the STOP file), seed, parsers_dir, ud_dir (the UD 2.19 release), inventory (the multilingual pilot's inventory-treebanks.tsv: language, treebank, licence, role, sizes), wiki_pages (the wikimd seeded page samples, <code>/pages/*.wiki), wikimd (its binary), dialects_dir, distcheck, langs (the order: more popular languages first), tiers (sample sizes by rank in that order: below_rank, wiki, dev, dev_treebanks), tokenizer (the wiki tokenizer, a parser entry) and parsers.

A parser entry: id, python (its environment), bridge, arg (the bridge's parser name; {lang}, {name} and the entry's vars are filled in), langs (language → model name), requires (a path that must exist for the language to be served: the model is downloaded), model_paths (hashed into the manifest), package (its version is read from the environment), style (the label map, below), mem_max, timeout_s, and the licence: either licence_rule: "stanza" (Apache-2.0 weights by the model cards; the depparse package's training treebank looked up in the inventory) or licence_class (clean, nc, gpl, unclear) with licence (the text).

The bridge interface is the one of the runner behind CYCLE_NEURAL: python -I BRIDGE <arg> <work dir> reads in/ids.txt and in/tokens.txt (a sentence per line, tokens separated by a space, a space inside a token as U+00A0) and writes out/<arg>.conllu, token for token. The multilingual bridge is peta/tools/treeagree/bridge/multi_neural.py (internal, with the language bridges of the agreer); it also prints one witness_stats JSON line (load and parse seconds, the torch peak) and has the modes tokenize-<lang> (Stanza tokenizer and MWT for the wiki samples), fetch-stanza and fetch-trankit.

Samples

Seeded and reproducible: a sentence is kept when SHA-256(seed, sample id, sentence id) is among the n lowest; the kept sentences stay in source order. samples/<lang>/<sample>/ holds ids.txt, tokens.txt, sample.json (seed, source and its SHA-256, selection rule, the ids and their hash) and, for dev samples, gold.conllu.zst.

Groups

With wiki_voters_extra in the plan, wiki samples are parsed only by the licence-clean parsers and the listed extra ones (round 2: Trankit), so short GPU time goes to silver first; the others stay for a later round.

A group is one parser × one language × one sample. Before every group the STOP file is read; a group runs its bridge under systemd-run --user --scope -p MemoryMax=…, killed after timeout_s; GPU memory is sampled every 0.5 s from nvidia-smi for the bridge's process tree. The output is checked (same ids and forms, heads in range) and written as <parser>/<lang>/<sample>.conllu.zst with <sample>.manifest.json: parser, bridge and its SHA-256, package version, model name, model hash (SHA-256 over every model file), licence text and class, training_labels_allowed, use, seed, sample ids and their hash, start and end, wall seconds, parse sentences per second (model load and warm-up excluded) and wall sentences per second, GPU peak of the process and of the card. A group with a manifest is done; a failed group writes <sample>.failed.json and is not retried. Every step is appended to groups.jsonl.

Labels and normalisation

The UD side of a language is counted from its UD 2.19 train and dev files (test files are not read). A parser label in that profile is kept; any other is looked up in the style's label map dialects/witness-<style>/labelmap.tsv (lang from to reason; * for every language; to = ! records a label as unmappable); without a rule the label is unmappable: it is counted, it votes on the head but not on the relation, and it is never guessed. profile writes labels/profile.tsv (every label each parser emits per language, with counts and whether UD 2.19 of the language has it), labels/diff.tsv (labels outside UD 2.19, mapped or unmappable, and frequent UD labels the parser never emits) and labels/summary.tsv. evidence writes labels/evidence.tsv: per parser label, on the even sentences of the dev samples, the gold labels of the words whose head is right, with shares. A rule goes into a label map only with that evidence (share at least 0.95, at least 50 words); score measures LAS before and after the map on the odd sentences (las_raw_odd, las_norm_odd), which the rules were not derived from, beside the whole-sample numbers, the round trip through the map's unique reverse (converted_words, roundtrip_restored) and the converter's negative control: one deliberately wrong rule (the parser's most frequent relation → dep) must lower LAS (control_red). The convert rule language of The Mova dialect: a UD metadialect, treebanks and converters cannot hold these rules yet: en::convert checks relations against the English relation set.

The agreer

A voter that could not parse a sentence wrote the abstain mark (every word _abstain) and does not vote on it. Voters are the parsers with an output for the sample, in plan order; any number of them (Mova's own parser joins as one more voter by writing the same files). Per word, after normalisation: the head with the most votes (a tie goes to the voter listed first), the relation with the most votes among the voters of that head whose label is mappable, the UPOS with the most votes. When the plurality heads are not a tree (a cycle, no root or several roots), the heads come from the maximum spanning tree over the votes (Chu–Liu–Edmonds, one root), and each word's relation and UPOS are agreed again at its new head; # agree_tree says valid or decoded.

Licences

A clean parser can still be kept out of the silver output for a language by the plan's no_silver (its convention does not fit the samples: Stanza ja gsdluw parses long-unit words, the samples are short-unit tokens); it then votes in the measurement output only.

Stanza's combined packages are reviewed in the plan's stanza_combined from Stanza 1.15's own dataset builders (stanza/utils/datasets/prepare_tokenizer_treebank.py): de GSD + Wiktionary lemmas, fi TDT (+ tokenizer-only fixes), sl SSJ + SST (+ SUK, CC BY-SA 4.0, for lemma and POS), sq STAF: clean; ja GSD + handparsed verb patterns and es AnCora + GSD + handparsed silver: unclear (Stanza's handparsed-treebank repository states no licence); it ISDT, VIT, TWITTIRO, PoSTWITA and he IAHLTwiki, IAHLTknesset, HTB: NC. The agreer takes the licence decision from the plan as it stands, so a reviewed package counts as clean in outputs agreed later; the manifests keep the decision of their run.

Only clean parsers give training labels: permissive weights trained on CC BY or CC BY-SA data, the data licence checked. NC, GPL and unclear models (UDPipe, UDify, COMBO, Trankit, spaCy on unchecked silver data, Stanza packages trained on NC treebanks or on several treebanks) are measured and vote in the measurement output only. Every manifest says which. The sweep's outputs and the agreer's measurement output are internal tests and measurements.

Checks

cargo test --release -p witness-sweep: seeded selection, the prose filter, CoNLL-U reading, plurality and ties, unmappable labels, tree validity, and the shuffle control's negative control.

Limits

The Wikipedia text comes from the wikimd page samples, so small wikis give few sentences; the tokenizer is Stanza's, so its errors are every parser's input. Stanza is both tokenizer and voter on wiki samples. Voters are not weighted (a better parser counts as much as a weaker one). LEMMA and FEATS are voted whole (no per-feature vote); Trankit gives no lemma; round-1 outputs have neither (_). Agreement of parsers that share a training treebank is not independent evidence.

This page in Markdown https://md.mova.elamur.ai/free/en/docs/tools/witness-sweep/