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.
Release files for japanese-address 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| japanese-address-0.2.tar.gz | 22.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| japanese_address-0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.9 kB
Release files / japanese-address-0.2.tar.gz
| Download URL | japanese-address-0.2.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd7a90778f37c6ee9cd5cdba081af4e29b0845251e3f0866e72078019f81dcec
|
|
BLAKE2b-256 checksum How to use checksums |
58a0898e92df40e74900f6daf99311516ca638a870165c9d94d9a1d2b2c96e0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / japanese_address-0.2-py3-none-any.whl
| Download URL | japanese_address-0.2-py3-none-any.whl |
|---|---|
| Size | 23.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb5a6ffc3d783194be593cd5d272f44d9ebbd94cf59b933f9bd542756652b87b
|
|
BLAKE2b-256 checksum How to use checksums |
0a2f23b33ef34a0c04e3c03e9caefe441a4538309847e097f5574b0162b7663d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|