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.10.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3baeebb7b1e36ee7bcb414bc51f889b79ef9414a9b345f38d8eae63c93d15cd1 |
|
MD5 | 12c75a4d0dc3b11ff76770f4deea0bfd |
|
BLAKE2b-256 | e1b075e56665cee933ae5bf97b3a60e45f14668d73fffbe12ed704608c8c1cc3 |
Close
Hashes for normalize_japanese_address-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ea098ccba8aa33b958b664f9ce373f27ae54074f40bf35808c39bbe65b4c553 |
|
MD5 | 7bb04051a3dac144f40950a10a74d7d4 |
|
BLAKE2b-256 | 9523e44a9dd7d01aa7a5e5ee4222a0ecc8995f396272e9351252be8a9efdbd71 |