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}")

Metadata

Release files for ez-address-parser 0.3.0

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.3.0
File Size Uploaded Provenance Actions
ez_address_parser-0.3.0.tar.gz 46.5 kB Without provenance Details for ez_address_parser-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 74.6 kB

Release files / ez_address_parser-0.3.0.tar.gz

Download URL ez_address_parser-0.3.0.tar.gz
Size 46.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c328da588f5cb3493605294be980f19d0e1f2fc77d68027c73cbf2293ff4bdf8
BLAKE2b-256 checksum
How to use checksums
94c1883a36213191a466018c3278abbad7468a83e3c36a40f244ecba6c720d7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

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

Download URL ez_address_parser-0.3.0-py3-none-any.whl
Size 28.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe4b31448ac591fe360abdcd06d98c3db1654f1b68e132cc93f403259d368ea0
BLAKE2b-256 checksum
How to use checksums
46688be42af3157980ab7a1dcb669e35fa0b3dd1b2742b2e8f631cb640a784fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.8

Security for ez-address-parser 0.3.0

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