Skip to main content

A Rust Library to parse japanese addresses.

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.1.24.tar.gz (49.8 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ Windows x86

japanese_address_parser_py-0.1.24-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.1.24-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.1.24-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.1.24-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.1.24-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.1.24-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.1.24-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.1.24-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.1.24.tar.gz.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24.tar.gz
Algorithm Hash digest
SHA256 63b700212b247d1624719b923ac9ab270e68f640ebe496d121ec8baba2788999
MD5 316ccd91716ea20c845a96377d60cf43
BLAKE2b-256 0107f5021b3b53ca70fd9c72f78c7b5a05fbf6c67cdde09b207383faa962e90b

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.1.24-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3d527d5c9f781ff30b77b6cf73854ecab2a6a87864920ec3f2cb0336a980293c
MD5 a68b4f5957673ec22d5cde93707cfb27
BLAKE2b-256 d5bfd92af1e73d8f45c3797fc86f4804e2fb69ce079bd6cba08a4c7925c8ccce

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.1.24-cp37-abi3-win32.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 6d4678827a0d22a5c2c72ea3021d121f7c1ac531ebdc15d7cec80ef283a2a6f7
MD5 1f2d37ea60c45580e386afd886f80e6a
BLAKE2b-256 46bc6bc49602308011af78aaa36f2f7e895dceb63ad505cd6393f2c94df76c47

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 390538ce2679d443adb10a5cbd7a5e599043382804875b0abc5aa66587c0dcf0
MD5 92b8a069f19a0daa7ad9e51a053504fa
BLAKE2b-256 1875e1f4bcf27c372eed72aec3d44991e3a14470f8cd501740779f672ef8796a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 bdc3e27f82c59238502a11058c87654b318ffc4a4905491486e263f4c4d0f51e
MD5 f041a00771b85e42d44dd50e28a48d53
BLAKE2b-256 b27d47be0b0e2205cb10abe13e0b125b46683f9d0be7a2637458f1494e3b0cd7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 474088cdedffd3913245151dd21e54c03036be6af499e79b6c774d53437fc746
MD5 5dc875ff1e952b72cd2e005fde12740e
BLAKE2b-256 7e04c262e205dbed22978cda6163783ed58cb4236fd0b12637584d23a2276599

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 92e5d41f7c5f910f1213e643860351f1866e18dd9b222e96524f8c9c45448843
MD5 a43804db67ccf4456d7cb928a5081976
BLAKE2b-256 857e711f594c0e86caaed033ac0eefc13d93f6baa04790df43473289a7e34cde

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b43e064a4cffe8115e9733fc8e32ef83b11ac901410c359ee9ceaf9b551b7a11
MD5 8a6b1757b1aba9e7a1dd7a91dee72ae9
BLAKE2b-256 35213189e0d8e090578fdb81fe72d75c6e241cbf849f0eb25301f0644309eba9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 34fd6286d1dde7acf496bf3cfd6fe7d381f890d563cc8c7282fd92e6377a4b5f
MD5 6b187bef68ebaf4240d085068660f918
BLAKE2b-256 558893a522bfc255ae3ef0de76c3477eaf16204cf77178119e6cb0dda5f59e41

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.1.24-cp37-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a350afbf974c738891609624e40a37732713b1b497eb185be84cfb2ab3d3eced
MD5 d3f2f2c1e73ab65db467a5787e179cd9
BLAKE2b-256 c7113a8cfd4161dc84836c1c069d210307cb365176c6710302e9e24e6b49d026

See more details on using hashes here.

File details

Details for the file japanese_address_parser_py-0.1.24-cp37-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.24-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a1ad64eede2626e0a0d280242d366e21f494cc7b0c4e51925fbd1203f78cb060
MD5 476d8ba2971218c6e8a9717ba482163c
BLAKE2b-256 554b78ffdac500eb829f43b3b21e28f3fddbac1e12c3d415ddd30b6aaaa179be

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