Skip to main content

Self-contained offline address parser powered by libpostal (global model)

Project description

address-finder

A fully self-contained Python address parser built on libpostal.

  • Zero HTTP/S3 calls at runtime
  • Global model, quantized (int8) + zstd-22 compressed
  • Works completely offline after install

Install

pip install address-finder

Usage

from address_finder import parse_address, expand_address

parse_address("781 Franklin Ave Crown Heights Brooklyn NYC NY 11216 USA")
# [('781', 'house_number'), ('franklin ave', 'road'), ...]

expand_address("Quatre vingt douze R. de la Roquette")
# ['92 rue de la roquette', ...]

Build from Source

# 1. Compile libpostal (Linux/Mac) or use WSL on Windows
bash scripts/build_libpostal.sh

# 2. Quantize model weights
python scripts/quantize_model.py --src /tmp/postal_raw --dst address_finder/_data_raw

# 3. Re-encode tries as DAWG (optional)
python scripts/build_dawg.py --datadir address_finder/_data_raw

# 4. Compress bundle
python scripts/compress_bundle.py

# 5. Build wheel
pip wheel . -w dist/

Windows

See scripts/build_windows.ps1 for step-by-step Windows build using WSL.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

address_finder-1.0.0-py3-none-win_amd64.whl (4.4 MB view details)

Uploaded Python 3Windows x86-64

File details

Details for the file address_finder-1.0.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for address_finder-1.0.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 980576ed2a1fe433803db2fd2962e5c3b35dbb9e9939b51809918d70462ca212
MD5 d63e427986e0dba58b44200e24990e83
BLAKE2b-256 ca105ffda62fdcf5d4337d0d69c319212a7db00e5e603e76f86611309c5ae36f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page