Skip to main content

UK address parser and named entity recognition (NER) using machine learning with utilities.

Project description

ukaddress-ner

UK address NER using CRFsuite with postcode utilities, a model manager, and a CLI.

Install

pip install ukaddresskit

Quick Start

Python

from ukaddresskit import parse, tag


print(parse("10 Downing Street SW1A 2AA"))
print(tag("Flat 2, 10 Queen Street, Bury BL8 1JG"))

CLI

ukaddresskit parse "10 Downing Street SW1A 2AA"         # auto-resolves model
ukaddresskit tag   "Flat 2, 10 Queen Street, Bury BL8 1JG"
ukaddresskit postcode "SW1A1AA" --town --county

Postcode Helpers

from ukaddresskit import normalize_postcode, get_post_town, get_county

normalize_postcode("sw1a2aa")  # "SW1A 2AA"
get_post_town("SW1A 2AA")      # "LONDON"
get_county("SW1A 2AA")         # "Greater London" (if in mapping)

Todo

  • Add outcode_to_county.csv into lookups
  • Fix bugs in library not loading on Colab
  • Create online docs

Project details


Download files

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

Source Distribution

ukaddresskit-0.0.4.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

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

ukaddresskit-0.0.4-py3-none-any.whl (4.1 MB view details)

Uploaded Python 3

File details

Details for the file ukaddresskit-0.0.4.tar.gz.

File metadata

  • Download URL: ukaddresskit-0.0.4.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for ukaddresskit-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7a94b11757097803a80d771883849180be90d29be1c8d842ffc1d5119c9849e7
MD5 00e570843b7cbb164f85c2fd7ec0e5f1
BLAKE2b-256 55b3acb9e18463a09c6a3343876e1e8a39ba1aa2b3613102e488a646844dfd88

See more details on using hashes here.

File details

Details for the file ukaddresskit-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: ukaddresskit-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.13

File hashes

Hashes for ukaddresskit-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 94eebf37a81c21b0a8c2c9abecdbe874309185f603d8a5a331977743d93dbcf4
MD5 b81bc323f2482eeaaffd3d2ccd3214d7
BLAKE2b-256 f9263d65d94bf560fc6cc923ffc437de2281d16f380cf620c62143e4f74d4d6d

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