Skip to main content

What confidence and ambiguity can tell you

A 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. node can have a high confidence while a place nametoponymA proper name for a geographic place. still resolves to several locations. A geocode can return coordinates at a coarse tier even when every component was labeled correctly. Which result tells you whether to use the answer?

A node score describes a component labelcomponent tagOne of the 25 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.. ResolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. candidates describe possible places for a parsed name. A coordinate tier and its provenance describe how the selected point was obtained. The application decides whether that evidence meets its use case.

Parse labels and place identities​

Consider a line containing a streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels., a place nametoponymA proper name for a geographic place., and a postcodepostcodeThe country-specific postcode (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one.. A reader can identify which words are the streetstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels. and which are the place while remaining unsure which real place the name identifies. A map can then provide a point for that place at citylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. scale without locating the building. Mailwoman exposes those judgments through different results so the caller can preserve the remaining uncertainty.

The parser's AddressTree contains labeled 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. and their confidence values. A resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. can attach place identities and alternatives to those 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 separate GeocodeResult contains the selected coordinate, its resolution_tier, epistemic_status, and any reported uncertainty_m. The result schema defines the fields.

Where node scores come from​

For a node built from the neural classifierneural 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 tree builder averages the selected pieces' labelcomponent tagOne of the 25 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. scores over the 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.. Word-consistency repair can replace a piece's score with the repair vote's mean before that average. The value describes the returned labelcomponent tagOne of the 25 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. for that 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.. It doesn't measure address existence, delivery, or coordinate accuracy.

Other paths produce node scores differently. A postcodepostcodeThe country-specific postcode (US ZIP, French code postal, etc.). Mailwoman handles postcode parsing entirely by rule classifier — a regex problem, not an ML one. or localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. fast path uses the query-shape or kind classifierkind classifierStage 2.5 of the runtime pipeline: categorizes the input into one of eight query kinds (structured_address, postcode_only, locality_only, intersection, po_box, landmark, poi_query, vague) so the coordinator can route to the right parsing strategy.'s confidence. A provisional node added by the phrase-grouper audit uses a scaled proposal score. These origins can be inspected through the pipelinestaged pipelineMailwoman's runtime architecture: a sequence of pure-function stages (normalize → query-shape → locale-hint → kind-classifier → phrase-grouper → classifier → decoder) connected by typed handoffs. Each stage is published as its own npm package. path and a node's source when present. A single threshold applied across all such nodes would mix scores from different mechanisms.

The parse inspection tutorial prints node scores for apt 4b 350 5th ave new york ny 10118 using the published 11.0.0 en-US packages. Those observed numbers describe that one run. They're not a measured error rate over other addresses.

Calibration of node scores​

createCalibrator can map a raw 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. score through an isotonic lookup table when a caller supplies the table to a direct classifier 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.. The default runtime 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. doesn't pass a calibration table. A mapping fitted on held-out labelscomponent tagOne of the 25 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. can support a frequency interpretation only for 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.' and population where the mapping has been evaluated.

The published @mailwoman/neural-weights-en-us@11.0.0 package identifies its 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.' as version 10.8.0. Its bundled calibration.json identifies model_version as 5.3.0. The bundled table was therefore fitted to an older 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.', and calibration for the 10.8.0 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 unknown. The model cardmodel cardA JSON metadata file (model-card.json) shipped with each weights bundle. It declares the model version, lineage, label set, required inference channels (anchor, gazetteer), calibration data, and training provenance. records calibration figures from that earlier fit. Those figures describe the 5.3.0 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.'. Treat the default node score as 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.' output whose current accuracy mapping is unknown. A decision threshold needs an independently checked calibration or outcome study for the exact 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.', localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for., input population, and cost of an incorrect acceptance.

Place candidates and ambiguity markers​

A correctly labeled 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. can still refer to several places. A geocode result lists the candidates the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. weighed for each parsed 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., with the selected place first. A candidate's score ranks places within its 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.. Candidate scores have no shared unitunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. across 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. or separate answers. A null candidate score comes with scoreUnmeasured, which states why the resolverresolverThe component that converts parsed address components (locality, region, postcode) into coordinates by looking them up in the gazetteer. The resolver ranks candidates by name match, population, and proximity, and returns the best-matching place with its centroid or polygon. has no measured score for that place.

For some bare place-name queries, the geocoder emits a declared_ambiguity intent marker when at least two distinct places can be ranked and the leading candidate doesn't meet its dominance test. The marker reports ambiguity while leaving the top-ranked answer in place. Its absence isn't a statement that the place is unique: the check can lack enough rankable candidates or the query can take another path. When the place identity matters, read the alternatives and the evidence behind the winner rather than interpreting 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. node's confidence as a place-match score.

Coordinate tier, status, source, and radius​

resolution_tier identifies how the point was produced: for example, address_point, interpolated, street, postcode, or admin. A building-level task needs evidence at a finer grain than a localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. or administrative centroid supplies. The house_number text can remain in a geocode result even when the selected coordinate comes from a coarser tier, because the field records what was parsed and the tier records what was located.

epistemic_status describes what the coordinate's evidence permits the caller to claim. It varies independently of the tier. A coordinate from an authority-designated register and one from a crowdsourced observation can occupy the same address_point tier while having different statuses. coordinate_source identifies the register row behind an address-point or interpolated coordinate when available. uncertainty_m is a reported radius in meters when the tier supplies one. A null value means the result provides no radius. A reported radius doesn't establish how frequently coordinates fall within that radius for the current data and conditions.

Unresolved results and abstention​

The parser returns a tree and records caught stagestageOne of the dataflow stages in the runtime pipeline (normalize, locale check, kind classify, phrase group, token classify, sequence correct, reconcile, resolve). Distinct from tier (model vocabulary) and phase (plan milestone). failures in faults. A classifier failure can leave that tree empty. The parser doesn't provide a general address-validity verdict. The geocoder can return lat: null, lon: null, and epistemic_status: unresolved when it has no coordinate. It can also return a coordinate with an ambiguity or coarser-answer advisory. These states report different conditions, and an advisory doesn't automatically suppress the coordinate.

An application should define the evidence it needs before accepting a result. A routing task may require an address-point coordinate from an acceptable source. A regional count may accept an administrative result. If the result has unresolved coordinates, unresolved identity, or an evidence tier below the application's requirement, the application can request more input or send the record for review.

  • How Mailwoman turns text into a parse explains where labelscomponent tagOne of the 25 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. and scores enter the pipelinestaged pipelineMailwoman's runtime architecture: a sequence of pure-function stages (normalize → query-shape → locale-hint → kind-classifier → phrase-grouper → classifier → decoder) connected by typed handoffs. Each stage is published as its own npm package..
  • Inspect the decisions behind a parse shows one published parser trace.
  • Parse and geocode result schema defines the result fields, candidate scores, tiers, and statuses.