python package for libpostal wrapper only for windows
Project description
pypostalwin
pypostalwin is the Un-Official Python wrapper to libpostal, a fast statistical parser/normalizer for street addresses anywhere in the world.
About libpostal
libpostal is a C library for parsing/normalizing street addresses around the world using statistical NLP and open data. The goal of this project is to understand location-based strings in every language, everywhere.
Installation
1. Build the libpostal in windows
- Before usign the Python wrapper, you need to build the libpostal C library as a bundle which can be accessed by the python package. (still under development)
(OR)
- You can use the prebuild bundle zipped file Download here
- Unpack the zip to C:\Workbench\libpostal\
- If you dont have Workbench folder in C Drive, then create one.
- Copy the zip inside the Workbench and unzip using 7zip
2 . Install the python wrapper
Install using pip . Offical Python Package Here!!
pip install pypostalwin
(OR)
Clone this Repository. Run this from the root directory to install
python setup.py install
Usage
Import Package
import pypostalwin
1. Initialize Address Parser Object
parser = pypostalwin.AddressParser()
parsedAddress = parser.runParser("The White House 1600 Pennsylvania Avenue NW, Washington, DC 20500, USA")
print(parsedAddress)
output
[
{'house': 'the white house'},
{'house_number': '1600'},
{'road': 'pennsylvania avenue nw'},
{'city': 'washington'},
{'state': 'dc'},
{'postcode': '20500'},
{'country': 'usa'}
]
2. Terminate Address Parser Object
parser.terminateParser()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pypostalwin-0.0.1.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for pypostalwin-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e7221283d1e3cc9d6d4b892f5e8721e0e5b602c559c4f089625b4c092abff99 |
|
MD5 | 465065fa9e08eb88e05b2fbcdab3aeab |
|
BLAKE2b-256 | d5eab71e44ae0c88b25dcdfd799fda88cccb5222964c66d0a053961f95f97b08 |