Skip to main content

Onboarding a country's evidence layer (pair-index overlay)

This is the repeatable recipe for giving a new countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. a retrieval-augmented decode prior — a gazetteergazetteerA geographical index that maps place names and postcodes to real-world coordinates. Mailwoman uses a custom-built Who's On First (WOF) SQLite database as its gazetteer — the 'atlas' half of the grammar/atlas architecture.-backed emission biasadditive biasA logit adjustment added before softmax from a prior or external knowledge source, typically soft-capped so it influences but never overrides the model's prediction. The mechanism behind shallow fusion. that resurrects a dead or starvedstarvedA tag with too little training representation to learn — near-zero F1 — because the corpus adapter never emits examples of it (intersection tags sat at 0% until an intersection synthesizer existed). place-hierarchy tag at decode time, on the untouched shipped modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.', with no retrain. It synthesizes the GB (en-gb) and NZ (en-nz) dependent_locality arcs into a procedure so that countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. N+1 is a recipe, not an arc.

The two worked cases this page distills:

  • GB — 19,209 (child, parent) pairs from HM Land Registry PPD, shipped in bundle 6.6.1 / @mailwoman/neural 7.7.0 (δ=10, transition-β=5).
  • NZ — 3,134 pairs from LINZ-derived OpenAddressesOpenAddresses (OA). A global open aggregation of address points collected from many official sources. A primary source of component-supervised training data outside proprietary registries., shipped in bundle 6.6.2 / npm 7.8.0 (δ=10, no β), including the repeated-name identity-pair convention.

Both ship on the same v385 base modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.'. The trainingtrainingThe process of adjusting a model's parameters so its predictions match labeled examples, by repeatedly measuring error and nudging the weights to reduce it. Distinct from inference, when the trained model is run on new input.-side resurrection lineage that preceded this capability closed at five falsified mechanisms and three stop-rule executions — the decode-side answer is what shipped. Read that history so you don't re-run it: the en-GB postmortem (docs/articles/evals/2026-07-22-night-en-gb-postmortem.md) and the placetype-pair ship-prep scorecard (its three postscripts are the arc's actual ending). The design records are docs/superpowers/plans/2026-07-24-pair-prior-comma-scope-KIMI_HANDOFF.md (the geometry problem) and its -BRAINSTORM_RESPONSE.md (the anchored-mode design); the full battery lives in .superpowers/sdd/task-8-report.md.

The doctrine this sits inside is registry-backed structured prediction: the registry supplies positive evidence only — a pair's absence never penalizes anything, and the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' keeps ownership of ambiguity. The prior nudges; it never dictates.

When this is the right tool (prereqs & premise check)

Reach for a pair-index overlay only when all of these hold. If any fails, this is the wrong mechanism — stop here.

  1. A dead or starvedstarvedA tag with too little training representation to learn — near-zero F1 — because the corpus adapter never emits examples of it (intersection tags sat at 0% until an intersection synthesizer existed). tag the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' won't emit. The worked case is dependent_locality: v385 was trained into never emitting it (~93% of trainingtrainingThe process of adjusting a model's parameters so its predictions match labeled examples, by repeatedly measuring error and nudging the weights to reduce it. Distinct from inference, when the trained model is run on new input. rows carry no such tag). Confirm the deficit directly — grade the shipped modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' on a real board for the tag and read the raw BIO, not the decoded JSON (decodeAsJson silently drops all-O spansspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.; a 0% read there can hide a non-emitting headattention headOne of several parallel attention computations in a layer, each free to focus on a different kind of relationship between tokens. Their outputs are concatenated — 'multi-head attention'. Mailwoman uses 4 heads.). The GB and NZ boards both read 0/N emit before the prior.
  2. The deficit is roughly UNIFORM. Measure the classifier's per-position logitlogitA raw, unnormalized per-label score the model outputs before softmax. Priors and biases are added in logit space, then softmax turns logits into probabilities. gap to the tag across the board. GB's gap mean was ~7.0 logitslogitA raw, unnormalized per-label score the model outputs before softmax. Priors and biases are added in logit space, then softmax turns logits into probabilities. (4.95 min); NZ's ~7.8. A uniform deficit is what makes a single δ clear the whole board at once (see the Calibrate section). A ragged deficit means per-position evidence the flat prior can't supply — a different problem.
  3. A CLOSED-vocabularyvocabularyThe fixed set of tokens a tokenizer can produce. Mailwoman's SentencePiece vocabulary is tens of thousands of subword pieces, with byte fallback for anything outside it. place-hierarchy relation — a child place nametoponymA proper name for a geographic place. under a parent place nametoponymA proper name for a geographic place., both drawn from a finite, authoritative register (Fishburn under Stockton-on-Tees). The pair index is a lookup table of real names; it cannot bias a name it has never seen.

The closed-vs-open-vocab wall — do not cross it

This mechanism works for closed-vocabvocabularyThe fixed set of tokens a tokenizer can produce. Mailwoman's SentencePiece vocabulary is tens of thousands of subword pieces, with byte fallback for anything outside it. place namestoponymA proper name for a geographic place. and fails for open-vocabvocabularyThe fixed set of tokens a tokenizer can produce. Mailwoman's SentencePiece vocabulary is tens of thousands of subword pieces, with byte fallback for anything outside it. spansspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. (venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label., streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels.). This is not a tuning gap; it is structural, and it was falsified with receipts — do not re-run these:

  • VenuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. pairs (#1287) and streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. pairs (#1288) were filed with probe designs and measured open. VenuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label./streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. surfaces are generative (Queens Park Cafe, North Cadbury Village Stores Ltd) — they are BUILT from real place namestoponymA proper name for a geographic place., so a place-pair index matches fragments of them and floods false positives. The confound is the mechanism's shadow, not an edge case.
  • The related healthy-tag reassignment hypothesis (re-tagging namesakes) was also FALSIFIED: the parseaddress parsingThe process of decomposing a free-text postal address string into structured components — house number, street name, locality, region, postcode, and country — so a geocoder can resolve them to coordinates. was never wrong there (189/189 regionregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. tagging held). A prior that fires where the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' is already right buys nothing and risks regressions.

The dividing line: a pair index biases a spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' reads as one place. If the target spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. is routinely embedded inside a longer generative name, you are on the open-vocabvocabularyThe fixed set of tokens a tokenizer can produce. Mailwoman's SentencePiece vocabulary is tens of thousands of subword pieces, with byte fallback for anything outside it. side of the wall and this recipe does not apply. The one lever that graduated to a build proposal beyond dependent_locality is transition-level evidence (β on the boundary transition), not a new tag class — see the Calibrate section.

1. Register → census

Pick one authoritative open register per countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. and extract (child, parent) tuples.

CountrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head.RegisterLicenceTuple source
GBHM Land Registry PPDOGL v3.0CITY (child) under DISTRICT (parent)
NZLINZ → OpenAddressesOpenAddresses (OA). A global open aggregation of address points collected from many official sources. A primary source of component-supervised training data outside proprietary registries.CC-BY 4.0suburb (child) under post town (parent)

The extraction lives in a corpus/src/tools/fetch/* fetcher (GB: ppd.ts emits gb-tuples.csv with NUMBER,STREET,CITY,DISTRICT,REGION,POSTCODE). The register catalogue is address data sources; a new countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. adds a row there.

Fold rules. Child and parent are folded through normalizeFSTToken (NFKC-lower, punctuation-strip) at build time — the same fold the decode prior applies to input windows, so the two ends can never drift. The header records foldVersion so a consumer detects a stale index if the fold ever changes. Folding is also where punctuation-variant duplicates merge: GB's raw census had 19,431 lines that folded to 19,209 distinct pairs (St Helens and St. Helens collapse to one key — the 221-merge-group receipt is in mailwoman/commands/gazetteer/pair-index.tsx's EXPECTED_GB_PAIR_COUNT doc comment). Dedupe is a build concern: serializePairIndex throws on a duplicate (child, parent) rather than silently last-write-wins, so a fold bug surfaces loud.

The identity-pair convention (the (x,x) rule). Some registers write the same name twice when the dependent localitydependent localityA sub-locality (neighbourhood or borough) hierarchically inside a larger locality — e.g. Brooklyn within New York City. Provides finer geographic specification below the primary locality. and the post town coincide — NZ is the measured case (Mangawhai, Mangawhai: 63/246 rows of the NZ golden board, 21.6% of NZ register names carry identity pairs; GB has zero, verified). Keep these rows. The (x,x) entry is the evidence of the convention: it tells the decode prior that when this name appears twice in adjacent fields, the first occurrence is the dependent_locality and the second is the post town. The prior's segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. path keys on it (see the file map at the end of this page); without the row it cannot make the split. GB carrying zero identity pairs is why the rule is inert for GB today and free for a future GB build that records CITY == DISTRICT rows.

2. Build the index

node mailwoman/out/cli.js gazetteer pair-index \
--country <cc> \
--source <tuples.csv> \
--delta <calibrated-d> \
[--transition-beta <b>] \
--out docs/static/mailwoman

The builder (mailwoman/commands/gazetteer/pair-index.tsx) streams the CSV, folds each CITY/DISTRICT pair, tags it dependent_locality, and writes pair-index-<cc>.bin through serializePairIndex. Notes that bite:

  • --delta is REQUIRED with no default. The calibration step (not the build) owns the real value; a silent default would let an uncalibrated number ship unnoticed. --transition-beta is optional and, when omitted, writes NO header key at all — a byte-shape-identical, beta-less artifact.
  • Per-countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. self-check probes are mandatory (#1283). PROBE_PAIRS_BY_COUNTRY in the builder holds a few known (child, parent) pairs per countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. code; after writing, the command re-reads the bytes through a fresh PairIndexResolver and prints PROBE OK / PROBE MISS. A countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. with no registered probes gets a loud throw, not a false pass — the en-nz first build ran the GB names against the NZ index and printed reassuring PROBE MISS lines that verified nothing (caught 2026-07-24). Add your countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head.'s probe pairs before you build. Include the identity pair if the register uses the convention (NZ registers ["Mangawhai","Mangawhai"]).
  • The PIX1 header carries the provenance. country, delta, transitionBeta?, foldVersion, schemaVersion, sourceMD5s, buildDate. Per-countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. calibration lives in the artifact header, not in code — a downstream consumer reads delta from the header, never a hardcoded constant. The format is owned end-to-end by neural/pair-index-resolver.ts (the serializePairIndex writer and the PairIndexResolver reader in one file, so the layout can never drift).

3. Candidate geometry — decide this BEFORE you calibrate

The single most expensive lesson of the arc: the false-positive surface is a candidate-geometry property, not a δ magnitude. Window mode (probe every sliding 1..3-word window against every other window, order-free) hit 79% venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-confound FP at δ=10; dropping δ to 8 only moved it to 53.5% — recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1. and FP fall together, the curves never separate. You cannot calibrate your way out of the wrong geometry. Pick the probe mode first, then calibrate within it.

The shipped chain is probeMode: "auto" (default), a strictly ordered fall-through:

  1. SegmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. path — engages when the input splits into ≥2 comma-delimited segmentssegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context.. A candidate is an ENTIRE comma-delimited segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. folded as one unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise., so North Cadbury Village Stores Ltd is one 5-word key that never equals the census's 2-word north cadbury. This is what defeats the venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-confound class structurally: a real place fires only when the input actually comma-delimits it as its own field. This path also strips a same-field trailing postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. from a parent-candidate key (#1308 — …Henbury, Macclesfield SK11 9PD folds to macclesfield, not macclesfield sk11 9pd, so the bare parent still matches).
  2. Anchored-adjacent path — engages only on comma-free input (the population segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. mode is deterministically inert on, so any bias here is strictly additive against a guaranteed zero matrix). Candidates are built by position, not by the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.''s own spansspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.: the parent anchor is the 1..3-word window immediately left of a postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one.-shaped spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. (or string-final when no postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one.), and the child is the adjacent window immediately left of the parent (child.endPos + 1 === parent.startPos, longest-match-left). Adjacency + suffix-anchoring is what keeps its FP at the segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. floor (~3–5%) instead of window mode's 79% — a venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-embedded child at string start is never immediately left of the post-town anchor.
  3. Otherwise the zero matrix (today's comma-free behavior).

"window" remains available as an explicit opt-in but is retired as a default: re-enabling it needs BOTH a venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-aware suppression mechanism AND a re-measured venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-confound FP of 0. Do not reach for it. Full contract and the falsifier verdict: neural/placetype-pair-prior.ts's module docstring.

Two structural findings worth internalizing before you design a new countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head.'s geometry:

  • A modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.'-derived segmentation cannot recover the target population. The split comma-free recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1. needs is exactly the split the dead-tag deficit means the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' cannot make — a two-pass decode that derives pseudo-segmentssegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. from the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.''s own first pass is structurally inert on the very rows it exists to serve (Fishburn Stockton-on-Tees reads as one fused locality spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. → one pseudo-segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. → no pair). The boundary source must be non-modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' (textual anchors). See the brainstorm-response Q1 verdict.
  • The modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.''s weak headsattention headOne of several parallel attention computations in a layer, each free to focus on a different kind of relationship between tokens. Their outputs are concatenated — 'multi-head attention'. Mailwoman uses 4 heads. can't be a veto signal. v385's venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. headattention headOne of several parallel attention computations in a layer, each free to focus on a different kind of relationship between tokens. Their outputs are concatenated — 'multi-head attention'. Mailwoman uses 4 heads. is itself starvedstarvedA tag with too little training representation to learn — near-zero F1 — because the corpus adapter never emits examples of it (intersection tags sat at 0% until an intersection synthesizer existed). on GB (measured inert, 0/20 candidate positions), so "veto where the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' reads venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label." buys nothing. The child-side streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. veto (fail-open) survives only as a contingency for the residual streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels.-verbatim-child class, gated behind a pre-registered FP>5% trigger.

4. Calibrate — the Option-A δ-sweep on the shipped model

Calibrate δ against the shipped modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' (v385), not a trainingtrainingThe process of adjusting a model's parameters so its predictions match labeled examples, by repeatedly measuring error and nudging the weights to reduce it. Distinct from inference, when the trained model is run on new input. checkpointcheckpointA saved snapshot of the model weights and optimizer state during training. Mailwoman saves a checkpoint periodically so training can resume after a GPU hang.. Sweep δ ∈ 12 and measure four numbers per δ:

  • emit / tag-correct recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1. on the golden dependent-localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighbourhood in the hierarchy. board,
  • golden no-DL FP (a board with no dependent localitydependent localityA sub-locality (neighbourhood or borough) hierarchically inside a larger locality — e.g. Brooklyn within New York City. Provides finer geographic specification below the primary locality. — must stay 0 at every δ),
  • venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-confound FP on REAL register-derived venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. names (see step 5),
  • and read the trajectory, not just the endpoint.

The GB sweep on the untouched v385:

δGB board (69 rows) emit / tag-correctgolden no-DL FP (51)venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-confound FP (6,500)
50/69 · 000.39%
735/69 · 3202.48%
1069/69 · 69/6903.34%
12–15flat0flat

The uniform-deficit finding → δ≈10 is a cross-localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for. constant, not per-countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. tuning. v385's classifier deficit for the tag is large but uniform (~7.0 logitslogitA raw, unnormalized per-label score the model outputs before softmax. Priors and biases are added in logit space, then softmax turns logits into probabilities. mean), so a δ that clears it clears the whole board at once — δ=10 saturates recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1.. NZ replicated the shape (gap mean 7.8 logitslogitA raw, unnormalized per-label score the model outputs before softmax. Priors and biases are added in logit space, then softmax turns logits into probabilities., same δ=10 works). Treat δ≈10 as the expected landing zone for a fresh countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head.; a wildly different optimum is a signal to re-check the deficit-uniformity premise (step-0), not to keep sweeping. FP grows monotonically with δ (roughly 6–10× from δ=3 to δ=7), so δ is a genuine recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1./FP dial — the smallest δ clearing the recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1. bar is load-bearing, and the trade lives entirely in the venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-confound floor.

Measure in the shipped configuration. The GB comma-free recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1. first registered as 50/69 was measured through an en-us-shaped harness cache with no postcode-gb.bin, so the anchor channel was silently off. The production-faithful baseline is 55/69 emit, 52/55 (94.5%) tag-correct — the GB postcode anchorsanchor inferenceA technique where structured knowledge (postcode locations, gazetteer place names) is injected into the model as soft input features — not as deterministic overrides. The model still decides the final labels, but the anchor signal biases it toward correct admin tags. help the decoderdecoderIn a transformer encoder-decoder model, the part that produces output sequences. Mailwoman's classifier is encoder-only (no decoder); the 'CRF decoder' is a different thing — a structured-prediction layer that picks the best label sequence from the encoder's outputs. split five additional localities. Reruns of both code bases reproduced 50/69 exactly under the old cache, proving it was measurement context, not code drift. Pin the harness to the production default (postcode-<cc>.bin present, anchor + gazetteergazetteerA geographical index that maps place names and postcodes to real-world coordinates. Mailwoman uses a custom-built Who's On First (WOF) SQLite database as its gazetteer — the 'atlas' half of the grammar/atlas architecture. channels on) before you read any calibration number.

The transition-β decision. The emission δ can win the per-tokentokenOne word or subword in the tokenized input. For the neural classifier, tokens come from SentencePiece (subword units); for the rule classifiers, tokens are whitespace- and punctuation-separated words. argmax at the child-start piece while the global ViterbiViterbi decodingA dynamic programming algorithm that finds the most likely sequence of hidden states (labels) given a sequence of observations (token emissions). Mailwoman uses Viterbi over a linear-chain CRF to produce globally coherent BIO label sequences from per-token model scores. still routes the path through a fused streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels./localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighbourhood in the hierarchy. run — the tokentokenOne word or subword in the tokenized input. For the neural classifier, tokens come from SentencePiece (subword units); for the rule classifiers, tokens are whitespace- and punctuation-separated words. votes right, the path fuses anyway. When that happens, add a transition-entry bonus: on every transition into B-<tag> at the child spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.'s first piece, which pays the structural continuation toll directly. The task-8 probe measured β=5 recovering 13/17 comma-free GB path-fusion misses (β=8: 15/17) with zero collateral on 47 correct rows + 200 venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. rows. GB ships β=5; NZ ships without a β (unmeasured there, and comma-free NZ is already at 99.2%) — β is per-countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head., calibrated like δ, and absent by default. One refinement: a child immediately preceded by a venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-title preposition (at / ofNew Inn at Hoff, Church of St Mary) keeps the emission biasadditive biasA logit adjustment added before softmax from a prior or external knowledge source, typically soft-capped so it influences but never overrides the model's prediction. The mechanism behind shallow fusion. but draws NO transition bonus, because a prepositional predecessor marks a lexicalized venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. title, not an address field. Address syntax introduces dependent localities positionally, never prepositionally.

5. The board battery (pre-registered)

Pre-register every bar in the config header (or the ledger) before the first measurement — no knob iteration inside a pre-registration, and no dropped failing rows. The battery, with bar shapes:

BoardWhat it measuresBar shape
Golden dep-loc boardemit + tag-correct recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1., prior ON at δ*materially above the 0/N floor, tag-correct majority
Golden no-DL FPfalse emission where there is no dependent localitydependent localityA sub-locality (neighbourhood or borough) hierarchically inside a larger locality — e.g. Brooklyn within New York City. Provides finer geographic specification below the primary locality.0 at every δ
Comma-stripped metamorphicthe anchored path on comma-free input≥ ~50/69 emit, ≥ 90% tag-correct (GB); do not regress
VenuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-confound FP (REAL data)fragments of real venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. names embeddingembeddingA vector of numbers representing a token (or other item) so that similar items sit near each other in vector space. The first thing the model does is turn each token into an embedding. real place namestoponymA proper name for a geographic place.≤ 5% at δ* (segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. floor ~3.3%)
Invariance --baseline v385labelcomponent tagOne of the 33 labels in Mailwoman's address schema — street, locality, region, postcode, house_number, unit, po_box, country, venue, intersection, and others. Each parsed span carries exactly one component tag.-preserving perturbations don't move the coordinateno new drift; profile no worse than baseline
Byte-stability, golden us/fr + presetsnon-target localeslocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for. + the 6 demo presets unaffectedbyte-identical, both weightsparameterA single learned number inside a model — one weight or bias. Mailwoman's encoder has roughly 30 million of them; training is the search for good values. worlds

Hard-won detail on the venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-confound board (#1279 lesson): build it from REAL venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. data, never synthetic. The GB board is 6,500 UK Food Standards Agency establishment names that embed a real place (Bitterne Charcoal Grill embeds Bitterne); the NZ board is 6,500 Overture NZ rows. The en-nz venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. precisionprecisionOf the spans the model labeled as a given tag, the fraction it got right. High precision means few false positives. Paired with recall to compute F1. was first reported off a synthetic interim, then off a borrowed harness cache (0.862%), and only the shipped no-anchor-bin configuration gives the real numbers — segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. 3.569%, anchored 1.354%. Retire the synthetic the moment real data exists, and correct any borrowed-cache number in the same record it was published in, dated — measurement context matters and gets documented, not buried.

Byte-stability is the doctrine's teeth: a shipped pair prior is auto-wired only when the resolved localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.'s countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. matches the index header's countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. (a hard gate in NeuralAddressClassifier.loadFromWeights), so en-us / fr-fr parsesaddress parsingThe process of decomposing a free-text postal address string into structured components — house number, street name, locality, region, postcode, and country — so a geocoder can resolve them to coordinates. are byte-identical by construction — assert it, then measure it anyway.

6. Package the overlay

The artifact ships as a data-only neural-weights-en-<cc> workspace that carries no modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' of its own — it resolves the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' + tokenizertokenizerThe component that converts a raw address string into a sequence of numeric token IDs the model can process. Mailwoman's tokenizer is a SentencePiece unigram model trained specifically on postal addresses. from the en-us base (baseWeights) and adds only the pair-index-<cc>.bin sibling. Clone neural-weights-fr-fr's package.json / .npmignore / scripts/link-dev-weights.ts and edit for the localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for. (this is exactly what git show b764309e did for en-gb). Then wire every list below — the arc touched all of them, and a missed one ships a broken or inert overlay:

  • release.config.json — add the localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for. to locales, and add a softFeed.pairIndexByCountry.<cc> entry { "source": "<csv-under-dataRoot>", "delta": <d>, "transitionBeta?": <b> }. This is the one source of truth copy-weights.ts reads to materialize the binary at publish time. (Note source is relative to weights.dataRoot, NOT dataRoot/wof like postcodeDBByCountry.)
  • .release-it.json — add neural-weights-en-<cc> to the workspace publish list.
  • root package.json — the workspaces glob must cover the new directory (a bare-rule .gitignore can silently swallow a new dir named like a rule — verify git status sees it).
  • .github/workflows/publish.yml — the HF fetch line ($CURL "${BASE}/pair-index-<cc>.bin"), the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.'/tokenizertokenizerThe component that converts a raw address string into a sequence of numeric token IDs the model can process. Mailwoman's tokenizer is a SentencePiece unigram model trained specifically on postal addresses. cp fallback from en-us, the two lexicon cp lines, and the non-empty [ -s "$f" ] guard list. The mailwoman release hf … --pair-indexes … help line in the error message must name the new binary too.
  • scripts/copy-weights.ts — no per-countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. edit needed; materializePairIndex is driven by softFeed.pairIndexByCountry, so a countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. with no entry is silently skipped. Confirm your entry is present.
  • scripts/link-dev-weights.ts in the new workspace — the freshness guard (see below).
  • neural-weights-en-<cc>/model-card.json — carries the overlay's provenance. If the countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. ships no postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. binary (NZ has no WOFWOF (Who's On First). An open-source gazetteer of places maintained by Mapzen/whosonfirst. Mailwoman builds a custom SQLite database from WOF GeoJSON repos, extended with postcode data, importance scores, and coincident-role relations. NZ shardshardA partial output file of the corpus build, written in Parquet format. The training pipeline streams shards row by row.), record a no_postcode_bin note so the publish guard's absence is expected, not a failure.

The freshness guard (δ + β lockstep)

link-dev-weights.ts builds pair-index-<cc>.bin in place (no committed binary source) via the compiled gazetteer pair-index CLI, and weights.test.ts re-invokes it on every yarn test. A cold PPD build is ~4–5 minutes, so the script skips a rebuild only when the existing artifact is verifiably fresh — it peeks the PIX1 header and rebuilds loud on any of: header.delta ≠ the script's PAIR_INDEX_DELTA const, header.transitionBetaPAIR_INDEX_TRANSITION_BETA (an absent field reads undefined and forces the rebuild that stamps it in), or header.sourceMD5s[0] ≠ a fresh md5 of the current source CSV. Keep the script's δ/β consts in lockstep with the shipped header: bumping δ in release.config.json without bumping the const ships a stale binary into every test run. (The header peek is reimplemented locally, not imported from @mailwoman/neural, so the data-only package gains no onnxruntimeONNX (Open Neural Network Exchange). An open format for machine learning models that enables interoperability between training frameworks and inference runtimes. Mailwoman ships its trained model as an ONNX file so it can run in Node.js and the browser via onnxruntime. dependency for one header read.)

The version-sync trap (#1284)

A new workspace must join at the current unified version (npm view mailwoman version), never 0.0.0scripts/prepare-release-version.ts's drift guard refuses to bump an unsynced tree. This bit the en-nz addition on its first 7.8.0 prepare: set the new package.json's version to the live unified number before the first prepare. A brand-new scoped package also needs a one-time manual first publish with a tokentokenOne word or subword in the tokenized input. For the neural classifier, tokens come from SentencePiece (subword units); for the rule classifiers, tokens are whitespace- and punctuation-separated words. before CI's Trusted Publishing can ever touch it (OIDC cannot create a package that doesn't exist) — see RELEASING.md § "Adding a NEW package".

7. Ship

The capability ships on the untouched base modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.', so this is a packaging release, not a modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' promotion. Follow the two-phasephaseA milestone in the implementation plan (Foundation, Corpus, Training, Integration, and forward-looking phases). Distinct from stage (runtime pipeline) and tier (model vocabulary). flow:

  1. StagestageOne of the dataflow stages in the runtime pipeline (normalize, locale gate, kind classify, phrase group, token classify, sequence correct, reconcile, resolve). Distinct from tier (model vocabulary) and phase (plan milestone). to Hugging Face first. mailwoman release hf v<version> … --pair-indexes pair-index-gb.bin,pair-index-nz.bin … uploads the built binaries alongside the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.' bytes. This is a hard prerequisite — the publish.yml fetch step pulls them from the bucket, and a missing artifact fails the [ -s "$f" ] guard. (Learned the hard way on the de demo outage: the release path must stagestageOne of the dataflow stages in the runtime pipeline (normalize, locale gate, kind classify, phrase group, token classify, sequence correct, reconcile, resolve). Distinct from tier (model vocabulary) and phase (plan milestone). every localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for.'s binary every time.)
  2. Two-phasephaseA milestone in the implementation plan (Foundation, Corpus, Training, Integration, and forward-looking phases). Distinct from stage (runtime pipeline) and tier (model vocabulary). PR release. The prep PR bumps release.config.json version, the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.'-card / staged_candidate_version, the ledger row, and the docs rows; the dispatch is a CI dry-run-then-real via the publish workflow (never local). See the mailwoman-release procedure and RELEASING.md.
  3. Verify the PUBLISHED tarball md5. Grade by explicit md5-pinned path against the published npm tarball's binary, never the dev symlink.
  4. The demo is a separate follow-up (#1278). The browser runtime fetches pair-index-<cc>.bin per parseaddress parsingThe process of decomposing a free-text postal address string into structured components — house number, street name, locality, region, postcode, and country — so a geocoder can resolve them to coordinates., selected by the locale gatelocale gateStage 2 of the runtime pipeline: rule-based locale detection from the query shape's script and known-format signals. Returns a LocaleHint with the top candidate and alternatives, surfacing disagreement with an explicit --locale flag. (neural-web phasesphaseA milestone in the implementation plan (Foundation, Corpus, Training, Integration, and forward-looking phases). Distinct from stage (runtime pipeline) and tier (model vocabulary). 1–3): the loader takes pairIndexURLs, a 404 leaves placetypePair undefined (inert, not an error), and the preset countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head.-pin routes the right index. Repoint the demo after the npm publish lands, not with it.

8. The earned lessons

The invariants (§5 of the road-to-v8 roadmap) plus what the arc added:

  • Measure in the shipped configuration. Twice in one night the same lesson bit: a harness cache missing postcode-<cc>.bin silenced the anchor channel and under-counted recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1. (55/69 became 50/69), and a borrowed cache mis-stated en-nz venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. FP by 6×. Pin the harness to the production default before reading any number; suspect the cache, not the code, when an identical-artifact rerun disagrees.
  • Candidate geometry before calibration. The 79% window-mode FP was geometry, not magnitude — δ moves recallrecallOf the spans whose gold label is a given tag, the fraction the model found. High recall means few misses. Paired with precision to compute F1. and FP together and cannot separate the wrong geometry's curves. Choose segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. / anchored / auto first; sweep δ only inside the chosen geometry.
  • Held-out generality or don't build. Every mechanism was measured on held-out register rows + REAL venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. confounds before it shipped, and the ones that didn't generalize were killed with receipts: venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label. pairs (#1287), streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. pairs (#1288), healthy-tag reassignment, modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.'-derived two-pass segmentation. A curated in-isolation probe set (the rung-3 100%/0% number) hides exactly the failure mode a real confound board surfaces.
  • Per-countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. calibration in the artifact header, not in code. δ and β live in the PIX1 header and are read from it; the only in-code copies are the link-script lockstep consts, guarded to rebuild on mismatch. A downstream consumer never hardcodes a calibrated number.
  • The closed-vs-open-vocabvocabularyThe fixed set of tokens a tokenizer can produce. Mailwoman's SentencePiece vocabulary is tens of thousands of subword pieces, with byte fallback for anything outside it. wall is structural. Place namestoponymA proper name for a geographic place. (closed) work; venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label./streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. spansspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree. (open, generative) do not, and no amount of suppression tuning crosses it. The marker-word list (house, road, street, flat, court) and the title-preposition list (at, of) are narrow, per-entry-justified lexical defenses — never a general venuevenueA named, non-address place — a business, building, park, or stadium. Mailwoman's free-text point-of-interest component, added as a Tier 2 fine label.-boundary detector, which is why the segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. restriction exists alongside them, not instead of them. Grow either list only with a per-word rationale line.
  • The postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one.-in-parent-field segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. gap (#1308). Free-text and idiomatic addresses write the postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. in the same comma-field as the post town with no comma between them (…Plimmerton, Porirua 5026). Strip a trailing postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one.-shaped run from a parent-candidate segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. key (per the header countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head.'s codex shape) before probing — segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. path only; the anchored path already anchors left of the whole postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. spanspanA contiguous range of characters or tokens in the input string, tagged with an address component type (street, locality, postcode, etc.). Parsed addresses are represented as collections of spans, possibly nested in a tree.. Only a trailing run, never a segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. that IS just a postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one., and only for a countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. with a known codex shape (else byte-stable).
  • Provenance is loud or it lies. Per-countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. self-check probes (#1283), the serializePairIndex duplicate throw, the header md5s, and the freshness guard all exist because a reassuring-looking PROBE MISS / silent skip / stale byte-identical artifact verified nothing. Loud beats silent at every seam.

The shipped mechanism (file map)

FileRole
neural/pair-index-resolver.tsPIX1 format — serializePairIndex writer + PairIndexResolver reader in one file; header carries country/delta/transitionBeta/foldVersion/sourceMD5s
neural/placetype-pair-prior.tsthe decode prior — segmentsegmentA punctuation-bounded chunk of the normalized input — the comma-separated parts of 'Portland, OR' — used to give downstream stages structural context. / anchored / window / auto chain, the (x,x) identity rule, transition-β, {at,of} suppression, the #1308 postcodepostcodeThe country-specific postal code (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. strip
mailwoman/commands/gazetteer/pair-index.tsxthe builder + per-countrycountryThe top-level address component (an ISO country). Closed-vocabulary, so it is best handled by a deterministic matcher feeding a proposal rather than a retrained model head. self-check probes + the GB cross-check count gate
neural-weights-en-<cc>/scripts/link-dev-weights.tsthe dev-materialize + freshness guard (δ + β + source-md5 lockstep)
release.config.json · .release-it.json · .github/workflows/publish.yml · scripts/copy-weights.tsthe release wiring — every list an overlay touches

The runtime flag and its resolution order are in runtime flags (placetypePair + probeMode); the modelneural classifierThe machine learning model at the core of Mailwoman's parser — a transformer encoder (~30M parameters) trained from scratch to do BIO token classification over addresses. It learns the 'grammar' of address formats; the gazetteer supplies the 'atlas.'-first doctrine for closed-vocabvocabularyThe fixed set of tokens a tokenizer can produce. Mailwoman's SentencePiece vocabulary is tens of thousands of subword pieces, with byte fallback for anything outside it. fields is in closed-vocab fields, model-first.