@mailwoman/neural-weights-en-nz 7.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,94 @@
1
+ ---
2
+ license: agpl-3.0
3
+ language:
4
+ - en
5
+ library_name: onnx
6
+ pipeline_tag: token-classification
7
+ tags:
8
+ - token-classification
9
+ - named-entity-recognition
10
+ - address-parsing
11
+ - postal-address
12
+ - geocoding
13
+ - onnx
14
+ - sequence-labeling
15
+ ---
16
+
17
+ # mailwoman — neural address-parser weights (en-nz)
18
+
19
+ The trained-model bundle (`@mailwoman/neural-weights-en-nz`) for
20
+ [Mailwoman](https://mailwoman.sister.software), a postal-address parser. This
21
+ package is **data only** — a `model-card.json`, the NZ placetype-pair
22
+ retrieval index, and the shared gazetteer lexicons. It has no JavaScript logic
23
+ of its own; it is loaded at inference time by `@mailwoman/neural`.
24
+
25
+ > **This locale is served by the shared multi-locale model.** The en-nz bundle
26
+ > ships no `model.onnx`/`tokenizer.model` of its own — it declares
27
+ > `@mailwoman/neural-weights-en-us` as its `mailwoman.baseWeights` and resolves
28
+ > the base package's model + tokenizer at runtime (byte-identical artifact; one
29
+ > encoder serves both locales). What this package ships is the **NZ-specific
30
+ > soft-feed data**: the placetype-pair retrieval index (`pair-index-nz.bin`,
31
+ > built from the LINZ-derived OpenAddresses NZ countrywide register — see
32
+ > _Evaluation_ below), plus the shared gazetteer/country lexicons.
33
+
34
+ ## What this is
35
+
36
+ The NZ-facing half of Mailwoman's retrieval side: real (child, parent)
37
+ suburb/town pairs (e.g. "Plimmerton" is a real suburb of "Porirua") fed to the
38
+ decoder as a soft `dependent_locality` bias, hard-gated to NZ input only. NZ's
39
+ register genuinely repeats names across tiers — 21.6% of its pairs are
40
+ identity pairs (suburb == town, e.g. "Mangawhai, Mangawhai") — which is why
41
+ `@mailwoman/neural` ≥7.8.0's identical-adjacent-segment rule exists; this
42
+ bundle's index is that rule's data source.
43
+
44
+ Unlike the en-gb sibling, **no postcode-anchor binary ships** — no WOF NZ
45
+ postcode shard exists yet, so the postcode-anchor channel resolves OFF for
46
+ en-nz (a loud one-time warning, not a crash). Building that shard is the
47
+ tracked follow-up in `model-card.json`.
48
+
49
+ ## Intended use
50
+
51
+ Parsing free-text NZ postal addresses into structured components (locality,
52
+ dependent_locality, street, house_number, …) for **geocoding** — resolving a
53
+ parsed address to coordinates via a gazetteer/resolver.
54
+
55
+ ## Ship-config requirement (read before using)
56
+
57
+ The Mailwoman model expects the soft anchor + gazetteer channels fed at
58
+ inference. Construct the scorer through `@mailwoman/neural`'s `createScorer`
59
+ (the canonical `ProductionScorer`), which reads the bundle's
60
+ `requires`/channel contract and **fails closed** if a declared channel isn't
61
+ fed. Do not hand-wire the raw ONNX session with the anchor input zero-filled.
62
+
63
+ ## Evaluation
64
+
65
+ **en-nz battery, 2026-07-24 — all 6 pre-registered bars PASS.** Prior ON at
66
+ the calibrated δ=10, on the shipped v385 base: NZ suburb board (246 rows)
67
+ as-written **246/246 emission, 246/246 tag-correct (100%)**; comma-stripped
68
+ **244/246 (99.2%)**; curated no-suburb board **0/54 false positives**. The
69
+ venue-confound read is **interim** — 0/510 on a synthetic board; no real NZ
70
+ venue-name source exists on disk yet (issue #1279). Every GB number reproduces
71
+ exactly through the same code path. Full breakdown, δ-sweep table, and the
72
+ repeated-name-convention story: `model-card.json`'s `eval` and `notes` blocks.
73
+
74
+ ## Limitations
75
+
76
+ - **Expects its channels** — see _Ship-config requirement_.
77
+ - **No NZ postcode anchor yet** — the anchor channel is OFF for en-nz until a
78
+ WOF NZ postcode shard is built (model-card follow-up).
79
+ - **Venue-confound specificity is interim** — measured 0 FP on a synthetic
80
+ board only; real NZ venue-name data is an open acquisition (issue #1279).
81
+ - **Placetype-pair prior is hard-gated to NZ** — it structurally cannot fire
82
+ on non-NZ input.
83
+ - **All-caps / shouting input degrades** the admin tags (mixed-case training);
84
+ `@mailwoman/neural`'s `normalizeCase` opt recovers detected all-caps ASCII.
85
+ - **Non-Latin scripts** (CJK, Cyrillic) fall through to byte-fallback tokens;
86
+ quality there is unmeasured.
87
+
88
+ ## License & links
89
+
90
+ - **License:** [AGPL-3.0-only](https://www.gnu.org/licenses/agpl-3.0.html).
91
+ - **Docs & concepts:** https://mailwoman.sister.software
92
+ - **Loader / scorer API:** `@mailwoman/neural` (`createScorer`).
93
+ - The functional contract for this bundle is `model-card.json`; this
94
+ `README.md` is the HuggingFace-facing card.