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 uk-address

Quick Start

Python

from ukaddress import parse, tag


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

CLI

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

Postcode Helpers

from ukaddress 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

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.1.tar.gz (2.3 kB 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.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ukaddresskit-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f570282f4fcdc40fbccf614fb49ae2cd96bd6c20593a2a1a94db350c99b538d8
MD5 55e17d6755e921b7d83336d0b42c088d
BLAKE2b-256 a2547c973cafad369b0b6fe3b0ed9cc53729f87ef21ef47b4124130ba3774781

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ukaddresskit-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d3c8c9466fe1b9ec102ee2e15e2badabad69360cf0cc30ea984eb18b3fb816a5
MD5 4438e6c0d03402377f718cc9c207db7e
BLAKE2b-256 b59be85bc269f52056736ace5ee2512bebebe777a63c5790c44346e5696a9d31

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