Japanese address parser
Project description
A japanese addresses parser
# installation
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丁目'}
# installation
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丁目'}
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
japanese-address-0.1.2.tar.gz
(135.5 kB
view hashes)
Built Distribution
Close
Hashes for japanese_address-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f4acaa25df795d2782a6bf42b1d96df6d7c9fd58b31d0cebda9f5e222bbbaa1 |
|
MD5 | ee61010a07d41f21fdfef1a2defd9aac |
|
BLAKE2b-256 | 4e6c5fccf8e8acf5f65c0aca6e568ed421dcb5d3662776f46946b581a14b5227 |