Skip to main content
logo

ez-address-parser

pytest coding_style PyPI - License PyPI - Python Version PyPI - Wheel Downloads GitHub Pages

A parser for Canadian postal addresses

Install

From PyPi

pip install ez-address-parser

From GitHub

pip install git+https://github.com/zehengl/ez-address-parser.git

Usage

Command Line

python -m ez_address_parser --address <some-address>

Code (with pretrained model)

from ez_address_parser import AddressParser

ap = AddressParser()

address = input("Address: ")
result = ap.parse(address)
for token, label in result:
    print(f"{token:20s} -> {label}")

Code (without pretrained model)

from ez_address_parser import AddressParser

ap = AddressParser(use_pretrained=False)

data = [
    [
        ('123', 'StreetNumber'),
        ('Main', 'StreetName'),
        ('St', 'StreetType'),
        ('E', 'StreetDirection')
    ],
    ...
] # list of list of (<token>, <label>) tuple

ap.train(data)

address = input("Address: ")
result = ap.parse(address)
for token, label in result:
    print(f"{token:20s} -> {label}")

Credits

Metadata

Release files for ez-address-parser 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ez-address-parser 0.2.5
File Size Uploaded Provenance
ez-address-parser-0.2.5.tar.gz 33.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ez-address-parser 0.2.5
File Interpreter ABI Platform
ez_address_parser-0.2.5-py3-none-any.whl Python 3 none any Details

Total release size: 61.1 kB

Release files / ez-address-parser-0.2.5.tar.gz

Download URL ez-address-parser-0.2.5.tar.gz
Size 33.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ddd2bf780615ef788dd3ed3560c6f75dfab2c930efa48076b13b1fca3d9943cc
BLAKE2b-256 checksum
How to use checksums
156616892aca8c8a1e5125791be1bd3ce5e328bab7d3e6ac494008b07435b183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Release files / ez_address_parser-0.2.5-py3-none-any.whl

Download URL ez_address_parser-0.2.5-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1a5c958971276e6046da530d6c10cbdaddb704ca8a2f818fbb50b76d5842333
BLAKE2b-256 checksum
How to use checksums
770f4a5cf69747c27faf64963f46800edd1ae28999df8171980c4a6aa803047d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.13

Security for ez-address-parser 0.2.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page