Metadata-Version: 2.4
Name: ukaddresskit
Version: 0.0.2
Summary: UK address parser and named entity recognition (NER) using machine learning with utilities.
Project-URL: Homepage, https://github.com/reachusama/ukaddresskit
Project-URL: Issues, https://github.com/reachusama/ukaddresskit/issues
Author-email: Usama Shahid <usamashahid.us8@gmail.com>
License: Copyright (c) 2018 The Python Packaging Authority
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: NER,UK,addresses,parsing,postcode
Requires-Python: >=3.8
Requires-Dist: lxml<6,>=4.9
Requires-Dist: pandas>=2.0.0
Requires-Dist: platformdirs>=4.2.2
Requires-Dist: python-crfsuite<=0.9.11,>=0.9.7
Provides-Extra: dev
Requires-Dist: mypy>=1.10; extra == 'dev'
Requires-Dist: pytest>=7.4; extra == 'dev'
Requires-Dist: ruff>=0.5.6; extra == 'dev'
Provides-Extra: train
Requires-Dist: scikit-learn>=1.3; extra == 'train'
Requires-Dist: sklearn-crfsuite>=0.3.6; extra == 'train'
Description-Content-Type: text/markdown

# ukaddress-ner

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

## Install

```bash
pip install uk-address
```

## Quick Start

Python
```python
from ukaddress import parse, tag


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

CLI
```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

```python
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