Metadata-Version: 2.4
Name: address-finder
Version: 1.0.3
Summary: Self-contained offline address parser powered by libpostal (global model)
Author: Karthikeyan Balasundaram
License: MIT
Project-URL: Homepage, https://github.com/karthikbd/address-finder
Project-URL: Repository, https://github.com/karthikbd/address-finder
Project-URL: Bug Tracker, https://github.com/karthikbd/address-finder/issues
Project-URL: Documentation, https://github.com/karthikbd/address-finder#readme
Keywords: address,address parser,address parsing,offline,libpostal,geocode,street address,postal address,nlp,natural language processing
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: GIS
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Linguistic
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: numpy>=1.24
Requires-Dist: address-finder-data>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: dawgdic; extra == "dev"

# 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
```bash
pip install address-finder
```

## Usage
```python
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
```bash
# 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.
