Skip to main content

A library for processing addresses of Japan

Project description

japanese-address-parser-py

A Python toolkit for processing Japanese addresses

PyPI - Version PyPI - Downloads Unit test & Integration test

What is it?

japanese-address-parser-py is a Python package for parsing Japanese addresses. Any address can be parsed into structured data.

Installation from PyPI

pip install japanese-address-parser-py

Usage

from japanese_address_parser_py import Parser

address_list = [
    "埼玉県さいたま市浦和区高砂3-15-1",
    "千葉県千葉市中央区市場町1-1",
    "東京都新宿区西新宿2-8-1",
    "神奈川県横浜市中区日本大通1"
]
parser = Parser()
for address in address_list:
    parse_result = parser.parse(address)
    print(parse_result.address)
{'prefecture': '埼玉県', 'town': '高砂三丁目', 'rest': '15-1', 'city': 'さいたま市浦和区'}
{'rest': '1-1', 'town': '市場町', 'prefecture': '千葉県', 'city': '千葉市中央区'}
{'prefecture': '東京都', 'rest': '8-1', 'town': '西新宿二丁目', 'city': '新宿区'}
{'town': '日本大通', 'city': '横浜市中区', 'prefecture': '神奈川県', 'rest': '1'}
from japanese_address_parser_py import Parser

parser = Parser()
address = "神奈川県横浜市中区本町6丁目50-10"
parse_result = parser.parse(address)
print(parse_result.address["prefecture"])
print(parse_result.address["city"])
print(parse_result.address["town"])
print(parse_result.address["rest"])
神奈川県
横浜市中区
本町六丁目
50-10

Development

This library is written in Rust. You need to set up a Rust development environment to build this library. Also, you need to install maturin as this library uses it in order to generate Python bindings.

# Install maturin
cargo install --locked maturin
# Clone repository
git clone https://github.com/YuukiToriyama/japanese-address-parser.git
# Build python module
cd japanse-address-parser/python
maturin build --release --out dist --find-interpreter
# Install the built library
python3 -m venv .venv
pip3 install dist/japanese_address_parser_py-[version]-cp37-abi3-[arch].whl

Support

This software is maintained by YuukiToriyama. If you have any questions, please create a new issue.

Where to get source code

The source code is hosted on GitHub at: https://github.com/YuukiToriyama/japanese-address-parser

Acknowledgements

This software was inspired by @geolonia/normalize-japanese-addresses.
In addition, the parsing process uses Geolonia 住所データ which is provided by 株式会社Geolonia.

License

This crate is distributed under the terms of the MIT license.

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_parser_py-0.2.0rc1.tar.gz (45.7 kB view details)

Uploaded Source

Built Distributions

japanese_address_parser_py-0.2.0rc1-cp37-abi3-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.7+ Windows x86-64

japanese_address_parser_py-0.2.0rc1-cp37-abi3-win32.whl (1.5 MB view details)

Uploaded CPython 3.7+ Windows x86

japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (2.3 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.8 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (1.8 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ i686

japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.5 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.8 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

japanese_address_parser_py-0.2.0rc1-cp37-abi3-macosx_11_0_arm64.whl (1.9 MB view details)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

japanese_address_parser_py-0.2.0rc1-cp37-abi3-macosx_10_12_x86_64.whl (2.0 MB view details)

Uploaded CPython 3.7+ macOS 10.12+ x86-64

File details

Details for the file japanese_address_parser_py-0.2.0rc1.tar.gz.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 b49c08b1f61435f6ac1f7893a3e397712cad329f3a0b21813397ca44045fa7e6
MD5 dbf7ac90d6db30aa8719e3e709fd29cb
BLAKE2b-256 a74e2662911e72ca39fc3e376a4c359e849ff7710e5596de1faaaaa3e3f54af9

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8da925bfd0c70328866f9781faf67043f2bdf4f4bc0600b74d910aec0e000f0e
MD5 c34d19199731d80d9c72d88b1fb69c74
BLAKE2b-256 01012b2864c0348d373bd3241153ad9fb31a2d5b44ee75a63b8c74d8eb6009ce

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-win32.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 4043b78edc815758b51ecd530e1ca4e63ec43a2a4065a3b300cf4590aeaaa379
MD5 dfb94a4e57bb86f3c571b50c38f0b048
BLAKE2b-256 b7982cf76aab88c0883b07b1058c6ac83e2463fb80f3e3c0e95c4f3e99fef783

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 91230cc5cc74c73c90421f48dac7c762dbe368697efde264a98e8af8e0730a98
MD5 20f0a251569dd8361232d6945ae14977
BLAKE2b-256 c4d92d8d739ca7427acd0acef9ecbb534aa74deef2d59b43866d30f61c1ca606

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 08cde3970a947e8e3975df2c847cada9ba7803c286118ff339a48cad8b74ad67
MD5 8bbdbc22d10bff5b3a68abef07c612db
BLAKE2b-256 3b271dcb4b3814a8f33c15954c9897952a634671b6b6d28f14326cf7326cf14a

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a83b30750192d2b4e7b5089d18723c78970f6639fdffb4ccd9145123f0c7ab5d
MD5 d419327ed697005953b1b24fe67eae4c
BLAKE2b-256 807b39b635af9d468a3455f36722ce90f9ecc73c32681c5c2c2a478f916336c0

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 333f8d35260c0d57f818b581352ce3be387a7adc3ed0c66715213f396d540a38
MD5 5447f961b190fc9350955316c28ea006
BLAKE2b-256 ece1171b90000ed4d44ae7c54c70e4f8193407041ca73e895303af9e53112045

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 da46836757fc0e65e844095b8f916f71c9c785f7fcf3fec5ee8b8b12123ea432
MD5 e3af0724bfbcd395a416bd3fd11debe9
BLAKE2b-256 9077c9152b1af3492ed47e27d68520f248427746ac28b287cf5b999fd311bccf

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 5fd64584f18fb7cdf1a99f1e462a792e45b09f3a348dcb026a2d5f9e3c8b5cbf
MD5 8bfed59e6d594037d4eaf2b118b7351f
BLAKE2b-256 464fa15f579477943f565bcfa5e87261ddeb93dd15faab6f69856510baeeabdf

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 02e07c82dfa1950ebfde0b724132342191f408291759e15db9aedf926dc27230
MD5 f3fcb00603514c57b588dec9b33ea613
BLAKE2b-256 4168880a9c44e65f81ce205298922a4e643914f166fda739f934d3ad3f90a252

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.2.0rc1-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc1-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b7cb65785b2a95d02e1dfc338000a8e84c1ee6b3bf5ae866346d553071bd3fe9
MD5 b00f10c96a5149d320ee11e93c535968
BLAKE2b-256 1901f5475953971ee172bbc609d6e97d10f1ef1fe0d9cb72154c5eef3b35094c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page