To normalize Japanese address.
Project description
Geolonia様のオープンソースの住所正規化ライブラリ( https://github.com/geolonia/normalize-japanese-addresses )をPythonに移植したものです。 現在まだ試作段階であり、Geolonia様のもとのライブラリと完全に同じ動作にはなっていません(テストのうち7.2%で失敗)。 また、仕様はすぐに変更する可能性があります。
インストール方法
- Windows環境の場合は、インストールの前に環境変数を設定してください
set PYTHONUTF8=1
pip install --upgrade normalize_japanese_address
使い方
from normalize_japanese_address.normalize import normalize
result = normalize('大阪府堺市北区新金岡町4丁1−8')
print(result)
とすると、resultに
{'pref': '大阪府', 'city': '堺市北区', 'town': '新金岡町四丁', 'address': '1-8', 'level': 3}
を返します。levelは、住所文字列のどこまでを判別できたかを以下の数値で示しています。
0
- 都道府県も判別できなかった。1
- 都道府県まで判別できた。2
- 市区町村まで判別できた。3
- 町丁目まで判別できた。
ライセンス、利用規約
- 本プログラムは、下記のプログラムをもとに開発されています。住所データのライセンスは CC BY 4.0、それ以外はMITとされており、本プログラムもそれに従います。
https://github.com/geolonia/normalize-japanese-addresses https://github.com/geolonia/japanese-addresses
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
Built Distribution
Close
Hashes for normalize_japanese_address-0.0.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03be0d74deb7fa5c700a24756575291bf50780f56f5da0555072b9e57b6a7249 |
|
MD5 | 2fa8408d39638ae1007fc576689530c5 |
|
BLAKE2b-256 | 5c407d8251f206cb07cc0db7b11c3a83c14e12f53aa8bb366e6e597eed635dd9 |
Close
Hashes for normalize_japanese_address-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 997a54d245bd46e5d80da294bfcf9b412f19de442228e54b5a664ab2c72f4a8d |
|
MD5 | eb0ffc680bddd6c13bd83e86ad0bb6a3 |
|
BLAKE2b-256 | e494e3394f5f1dd8bf3bd868e732acff0ac2728e644794022fa9b1f2348daf8f |