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.3.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.3-py3-none-any.whl (4.1 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ukaddresskit-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 3b5e232e3d024f23515f93b5bf922678167d3a9647f5e96a18be9f180bb37060
MD5 c9e645fbbb5e02ec0a31a1960e74c5de
BLAKE2b-256 763ba2a159e7b8b64d8422869316b65eb9414dde233ce20ff8166c83364272ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ukaddresskit-0.0.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a9d98c5396559c675d0678a2582ac1939847799cd83b4f5f694dfffaed4399fd
MD5 6aa6e46c209c3b8872d3243d1e32332f
BLAKE2b-256 1a0a87cdaf8c71b61628fdd4ce7b74da43185bc84b9822629429aa438e2d1a3f

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