Repository navigation
feat(matching): allow for street abbreviations when comparing addresses - #982
Merged
Merged
Conversation
Compare street names word by word, where two words are the same if libpostal's address dictionaries list them on one line, such as `str.` and `straße`, `rd` and `road`, `av` and `avenida`. Separable suffixes are split off (`Nussdorferplatz` = `Nussdorfer Platz`), and accents and `ß` are folded. The dictionaries (MIT) are vendored as src/matchers/street_abbreviations.txt by a new generator script, and listed in the SBOM. This is used for the `addr:street` evidence and in the address check that far contact and brand-name matches must pass. Closes #981 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ttfb2JTNAMoqAQXFFQ4fad
brawer
added a commit
that referenced
this pull request
Nov 17, 2026
Write up what #980 (postcodes, house numbers in addr:street) and #982 (street abbreviations from libpostal's dictionaries) changed, with the planet tag-agreement numbers, the regional matching runs, the Japanese postcode formats, and what is still left open. Claude-Session: https://claude.ai/code/session_01Ttfb2JTNAMoqAQXFFQ4fad Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Sascha · project thread
Closes #981.
What it does
matchers::street: compares street names word by word. Two words are the same if libpostal's address dictionaries list them on one line, for examplestr./straße,rd/road,av/avenida,n/north,ul/ulica. This isn't transitive:stmatchesstreetandsaint, but those two don't match each other. Separable suffixes are split off, soNussdorferplatz=Nussdorfer Platz. Accents andßare folded.addr:streetevidence (match.evidence.agreeing, spider-stats) uses it.280 S. Washington St.failed againstSouth Washington Street.src/matchers/street_abbreviations.txt. They're generated byscripts/generate_street_abbreviations.pyfrom a pinned libpostal checkout. There is no C library and no model. The dictionaries are listed in the SBOM aslibpostal-dictionaries. I checked the jq change with jq 1.8.1 on a small input.Evaluation
Tag agreement, planet (production output 2026-11-09, 58,416 matches with
addr:streeton both sides): agreement goes from 48.9% (#980) to 71.1%, which is +12,987 streets. The biggest gains are DE (+7.2k, mostly maes_dkvStr.), AT, US, ZA and FR. A random sample of 150 newly agreeing rows had 150/150 right.Matching, regional A/B runs (same binary with the dictionaries on and off, ATP 2026-11-07):
addr:streetagreeingAll six new matches are right, for example
Av Ayrton Senna, 3243/Avenida Ayrton SennaandCh Grély 18/Chemin Grély. None was lost or moved, and the conflate step's run time is unchanged. The matching effect is small because addresses only gate non-wikidata matches beyond 150 m.Tests
cargo test --lib: 484 passed, and clippy is clean. The integration tests need tippecanoe, which the sandbox lacks, so CI covers them.Generated by Claude Code