Skip to main content

Gazetteers

The question

A parser can tell you that Springfield is being used as the name of a town. It cannot tell you where that town is, because that is not a fact about language — it is a fact about the world, and it has to come out of a database. That database is 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.: a list of places, each with a name, a type, a position and a parent. Everything a geocoder knows about the world, it knows because 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. told it.

So what is in one, what is not, and how good is it?

The analog

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. is the index at the back of an atlas, with one addition: it records which places sit inside which. Sangamon County knows it is in Illinois, which knows it is in the United States. That chain — the containment hierarchy — is what turns a list of names into something you can reason with. Without it, Springfield is ninety-two names in the United States alone. With it, Springfield inside Illinois narrows to the handful that sit in one state.

What 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. is not is an address database. It holds places — countries, regionsregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality., counties, towns, neighborhoods, sometimes venuesvenueA 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.. It does not hold 413 S 8th St. RooftoprooftopGeocoding precision at the building or parcel level — coordinates within a few meters — the highest tier of the geocode cascade. Sourced from address-point and situs data. coordinates come from a different kind of artifact entirely: national address registersinput modeThe Decision-A register switch: 'fragmented' (human-typed fragments — feeds the evidence channels) vs 'formatted' (complete records — runs the trained absence identity). Explicit on CLI/API; per-endpoint defaults (batch→formatted, autocomplete→fragmented); kind-derived otherwise., survey files, per-state point files. A geocoder that resolves to a building is consulting at least two datasets, and only one of them is the 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..

Who's On First

Mailwoman's 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. is Who's On First, an open 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. originally built at Mapzen and now maintained around the SFO Museum. Four properties made it the choice:

  • A stable identifier per place. The identifier does not change when the place is renamed or its boundary is redrawn, so a result can be joined against anything else that speaks the same identifiers.
  • A containment hierarchy that covers the whole dataset, with an opinion about how the world's administrative levels nest. OpenStreetMapOpenStreetMap (OSM). A community-curated global map database (ODbL-licensed) with addr:* tagged features and place hierarchies. A secondary corpus source and a source of street names. does not supply one; GeoNamesGeoNamesA free global gazetteer combining administrative, postal, and POI data across 200+ countries. Supplements Who's On First for postcode centroids and places where WOF has gaps. supplies part of one.
  • Names in every language a place has them in, including historical and colloquial forms, so Munich, München and Monaco di Baviera land on the same record.
  • An open license compatible with shipping the derived artifacts.

The reference build these docs are written against — admin-global-priority.db, sealed 2026-08-02, md5 515beab21eaaea13f77defc6afd9374d — carries 4,765,307 current places across 244 countries. That is the shape of the world Mailwoman can name.

The part nobody warns you about: half of it is dots

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. record's position can be one of two very different things. It can be a polygon — the place's actual boundary, from which a center can be computed and inside which a point can be tested. Or it can be a point — one coordinate, with no extent, because whoever contributed the record had a coordinate and not a shape.

Both look identical in a result. Both give you a latitude/longitude. Only one of them can answer the question "is this address inside this town?"

Counting places whose stored bounding box has zero extent gives the split. In the build above, at localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. rank:

  • 4,363,934 places, of which 2,148,316 are stored as points — 49.2%, near enough to half.
  • None of those zero-extent records sits at (0, 0), so they are points at real locations rather than records missing their position. This is a shape gap, not a data gap.

And it is wildly uneven by 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.. At localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. rank, the share stored as points runs from 1.3% in Germany and 29.8% in Great Britain, through 39.5% in India and 40.8% in France, to 71.3% in the United States, 98.9% in Japan and 99.7% in South Korea.

Japan is the clearest case, and it is worth stating precisely because it is easy to misread as a quality problem. Of Japan's 43,868 current localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy.-rank places, 43,368 are points. Every one of its 47 regionsregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. and 1,738 counties carries a real extent. So the boundaries exist at prefecture and county grain and stop there — which mirrors how Japanese addressing works, since it numbers blocks within wards rather than buildings along named streetsstreetThe named linear feature along which house numbers are ordered. Decomposes into a name plus street affixes; one of the Tier 2 fine labels.. The 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. is not broken; it is recording 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. whose fine-grained administrative unitsunitA subdivision of a building — apartment, suite, floor — that refines a street address. Mailwoman's unit component; a designator plus identifier forms a subpremise. were contributed as centers.

The consequence for a geocoder is direct. A containment test against a point cannot succeed, because a point has no inside. Any operation that asks "which localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. contains this coordinate" loses every place stored that way, and it loses them in a pattern — by 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., all at once. This is the kind of gap that a spot check in Berlin will never find and a spot check in Osaka will find immediately.

Mailwoman's reverse path reports the difference rather than hiding it. Its containment field reads polygon when a real boundary confirmed the deepest place and approximate when nothing had a boundary and the nearest center won instead. Read that field, and 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.'s point-shaped records announce themselves in the output. Reverse geocode a coordinate has the walkthrough.

Why gazetteer quality is the ceiling

A geocoder cannot resolve to a place its 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. does not carry at the rank it looks for. That sentence sounds like a truism and it is the source of a whole class of production defects, because the failure does not look like a missing record. It looks like a wrong answer.

The pattern: a name the postal service accepts as a citylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. is carried by the 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. at a different rank — a neighborhood, a boroughboroughAn administrative or historical division of a city — e.g. the five boroughs of New York City. May be postal, legal, or both, and complicates the locality hierarchy., an alias attached to some other town — and 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., looking for a localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy., does not find the record you expected. What it finds instead is whatever else in that regionregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. happens to carry the name. The output is a coordinate, in the right 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., at the right administrative tier, for the wrong place. Nothing in it is flagged, because from 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.'s position nothing went wrong.

The defense is to read the ancestry rather than the coordinate. A result that names the record it landed on lets you check that the record is the one you meant; a result that gives you only a point does not. Two addresses, one building covers the postal side of this — why a building's postal citypostal cityThe city name the postal service uses for a ZIP, which can differ from the legal municipality a resident lives in — e.g. many suburbs share a larger city's postal name. A source of locality ambiguity. and its municipalitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. are different names for different readers, both correct.

What containment buys, when the shapes are there

Where the hierarchy is intact, it does the disambiguation work that no amount of string matching can. A localitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy. lookup scoped to an already-resolved regionregionThe first-level administrative subdivision of a country — a US state, a French region, a province. The component between country and locality. cannot return a same-named town in another state: the candidate is not a descendant, so it never enters the pool. Springfield on its own is a ninety-two-way question; Springfield, IL comes back with three candidates, and no fuzzy comparison was involved in getting from one to the other. That constraint is also what keeps the lookup cheap enough to run from disk — see The two architectures.

This is also why 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.'s hierarchy is more valuable than its coordinate 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. for most questions. Getting the town's center wrong by two kilometers costs you two kilometers. Getting the town's parent wrong costs you the state.

What it costs

Depending on an open 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. means inheriting its shape. CoveragecoverageThe fraction of a population or region for which a data source has real, non-placeholder entries — e.g. 47% rooftop coverage on Texas addresses. Distinct from accuracy on the rows that are present. that is thin 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. stays thin until upstream fixes it, and the fix is not something a better 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.' reaches. The framing worth keeping is that 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.' bounds how well the input is understood and the 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. bounds how well the world is known, and improving one does nothing for the other. That is why coveragecoverageThe fraction of a population or region for which a data source has real, non-placeholder entries — e.g. 47% rooftop coverage on Texas addresses. Distinct from accuracy on the rows that are present. claims here are made per localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for. and measured rather than asserted for the world.

  • What ships today — the current per-localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for. picture, including the thin ones.
  • Locales and tiers — what a tier means and which data bundleevidence bundleThe pair of retrieval-augmented input channels (street-type + locality-surface) that feed lexicon membership as soft per-token evidence alongside the text. Shipped in 6.7.0; trained natively from step 0 in the from-scratch base line. each localelocaleThe combination of language and country an address comes from. en-US and fr-FR are the locales Mailwoman ships weights for. needs.
  • The two architectures — how each design queries 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..
  • Two addresses, one buildingpostal citypostal cityThe city name the postal service uses for a ZIP, which can differ from the legal municipality a resident lives in — e.g. many suburbs share a larger city's postal name. A source of locality ambiguity. against municipalitylocalityThe city / town / settlement component of an address: a populated place sitting between region and neighborhood in the hierarchy..
  • Improve geocode precision — the address-point data that sits beside the 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..