Japanese address parser
Project description
A Japanese addresses parser
Install instructions
pip install japanese-address
Usage
> from japanese_address import parse
> parse('北海道 札幌市 中央区北5条西4-7')
{'prefecture': '北海道',
'prefecture_eng': 'Hokkaido',
'unparsed_right': '北5条西4-7',
'city': '札幌市',
'city_eng': 'Sapporo',
'ward': '中央区',
'ward_eng': 'Chūō'}
> parse('東京都江東区豊洲2丁目4-9')
{'prefecture': '東京都',
'prefecture_eng': 'Tokyo',
'unparsed_right': '4-9',
'ward': '江東区',
'ward_eng': 'Kōtō',
'city_district': '豊洲2丁目'}
Data source
The following Wikipedia pages are used to gather data used to parse Japanese addresses:
To upgrade the data, use the following command:
$ python dataloader.py
If everything goes fine, the files data/cities.py, data/towns.py and data/wards.py
will be updated with the latest content available at the mentioned pages. Commit
them to the repository and create a new release.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file japanese-address-0.2.tar.gz.
File metadata
- Download URL: japanese-address-0.2.tar.gz
- Upload date:
- Size: 22.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd7a90778f37c6ee9cd5cdba081af4e29b0845251e3f0866e72078019f81dcec
|
|
| MD5 |
e49ad7f1fd9fda18980c95a856a84d4d
|
|
| BLAKE2b-256 |
58a0898e92df40e74900f6daf99311516ca638a870165c9d94d9a1d2b2c96e0f
|
File details
Details for the file japanese_address-0.2-py3-none-any.whl.
File metadata
- Download URL: japanese_address-0.2-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb5a6ffc3d783194be593cd5d272f44d9ebbd94cf59b933f9bd542756652b87b
|
|
| MD5 |
e54b21a98ee13c5825bbffa9246cb976
|
|
| BLAKE2b-256 |
0a2f23b33ef34a0c04e3c03e9caefe441a4538309847e097f5574b0162b7663d
|