Skip to main content

This is to standardize Japanese addresses by separating them into sets of prefecture, city, town, and additional details, based on Geolonia's TypeScript library (https://github.com/geolonia/normalize-japanese-addresses). It is currently still in the early stage and does not behave exactly the same as Geolonia's original library (fails in 7.1% of tests).

Geolonia様のオープンソースの住所正規化ライブラリ( https://github.com/geolonia/normalize-japanese-addresses )をPythonに移植したものです。 現在まだ試作段階であり、Geolonia様のもとのライブラリと完全に同じ動作にはなっていません(テストのうち7.1%で失敗)。

インストール方法

  • 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, 'lat': 34.568184,  'long': 135.519409}

を返します。levelは、住所文字列のどこまでを判別できたかを以下の数値で示しています。

  • 0 - 都道府県も判別できなかった。
  • 1 - 都道府県まで判別できた。
  • 2 - 市区町村まで判別できた。
  • 3 - 町丁目まで判別できた。

ライブラリの名称

  • normalize-japanese-addressesではなく、normalize_japanese_address という名称になっています。ハイフンがアンダーバーになっているほか、addressが単数になっているのに深い意味はありません。

メンテナンス

ライセンス、利用規約

  • 本プログラムは、下記のプログラムをもとに開発されています。住所データのライセンスは CC BY 4.0、それ以外はMITとされており、本プログラムもそれに従います。

https://github.com/geolonia/normalize-japanese-addresses https://github.com/geolonia/japanese-addresses

Metadata

Release files for normalize-japanese-address 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for normalize-japanese-address 0.0.13
File Size Uploaded Provenance Actions
normalize_japanese_address-0.0.13.tar.gz 3.9 MB Without provenance Details for normalize_japanese_address-0.0.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for normalize-japanese-address 0.0.13
File Interpreter ABI Platform Actions
normalize_japanese_address-0.0.13-py3-none-any.whl Python 3 none any Details for normalize_japanese_address-0.0.13-py3-none-any.whl

Total release size: 8.5 MB

Release files / normalize_japanese_address-0.0.13.tar.gz

Download URL normalize_japanese_address-0.0.13.tar.gz
Size 3.9 MB
Tags Source
SHA-256 checksum
How to use checksums
87d7dd07f4f0bbaedf92764efe8e66178dcbf94b4b2ee3dac546c8f75a225a86
BLAKE2b-256 checksum
How to use checksums
af84c0b33def4b72f7fdb28b54fdc150317d42f15e2da6080def9154cbcb1458
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.5 CPython/3.10.12

Release files / normalize_japanese_address-0.0.13-py3-none-any.whl

Download URL normalize_japanese_address-0.0.13-py3-none-any.whl
Size 4.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
4b68134b7db4cc7de9098a391ef32c774808fb9685e8037f28046ef4be606009
BLAKE2b-256 checksum
How to use checksums
33ba1ec93d3b2be993240d01af15621e608432ed8bb8c0deb1d76db6b10a4dad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 colorama/0.4.4 importlib-metadata/4.6.4 keyring/23.5.0 pkginfo/1.8.2 readme-renderer/34.0 requests-toolbelt/0.9.1 requests/2.31.0 rfc3986/1.5.0 tqdm/4.65.0 urllib3/1.26.5 CPython/3.10.12

Security for normalize-japanese-address 0.0.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page