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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ Windows x86

japanese_address_parser_py-0.1.21-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.21-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.21-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

japanese_address_parser_py-0.1.21-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (1.9 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ i686

japanese_address_parser_py-0.1.21-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.6 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

japanese_address_parser_py-0.1.21-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.21-cp37-abi3-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.7+ macOS 11.0+ ARM64

japanese_address_parser_py-0.1.21-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.21.tar.gz.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21.tar.gz
Algorithm Hash digest
SHA256 00d69c270b85f2ac8d012283c66b8bcdc960a12b798470692d52a0584205b1ab
MD5 6a1d40bb27761db1d9d009367e40a4fb
BLAKE2b-256 beec65d914fdbe0e0e1f5305bfe89c17c622acac77bbfe38f11862e6f6c15697

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 40a96e8e344ef5ee6664090797f38c998489d28ae84792c3ddf5418e0e100089
MD5 c9688652bf9f272cefca9ca6ef5886f8
BLAKE2b-256 833a64b7dbd1858e7d8759dcdf1d116ca5a6ced67bb37c7fd4a0a2191d70f392

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 e75a4047cf85f18467f0313577c86e0ae146506e19ec69d22ba4fb8e3003843d
MD5 e1f62127d63b9efaba395200544adb16
BLAKE2b-256 259bb360a7fe46eff5bf5bd38a14fc54b37e95b2df8c12a2903a7d267742a4f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5181331249ace14a447d357fa5733b2c804c841ec98e75fc106d7c25105a1d9c
MD5 3a1dcdc0c984933f2e495f1af02475d0
BLAKE2b-256 5e9afdf83cb498ee4ec9bbc3bbb49ca3a08eff9464eaf8d275d4d947eee43950

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 0c4093db3629666e254b49627deacb64bebd0f84b5d0454cb4265efe2e81c182
MD5 8426de262c096d61e4d8d9abd83a2ff9
BLAKE2b-256 2c220ecf35cac1b25a0950942a540913de4d455c8929eacc29b56a2b2382a28d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 2b5662a186938ffb70fef44ddba1a65124e1286d11c591d4343cae2908d6eab4
MD5 3b77fa7016b943e0a44cbcaa40fd665c
BLAKE2b-256 76053a15d471171f582ddd186a425596fe56e453375bfcc5b3846b2ac798e686

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 b8cf9f88d9184bba8bcab87f30c953aaa3dcc8078657178f67c21e26e402bbcf
MD5 d0751016f77ee4efca71bef8b63753dd
BLAKE2b-256 b170b60e2a3b0f83d3dd9da518d9746d5af06ff18715edb0ebb4818c2316bfae

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 22d09c1433e5cabae60cfac4276d34d1ad0c3f8593b8c02afe7347264dcfd1cf
MD5 7ae82f4edad644929ef1bbb93aafd602
BLAKE2b-256 57f2f2ea7a99ab5ed37ffd6d11f59a26f3636665d7185470691825ffeff3c328

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a15e8fa4c6cb88529670a73c4200efec374eed515b4ee490ae687a53267386a1
MD5 370bdc687f982a9420b8efeb32c89c43
BLAKE2b-256 c22a5ed6e0a84402893b6dd5d15ae234e6a404205e68b31968ba82834e6a75dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 972a7655dab6a6ce145edaf713bca6d6a03f3750aac045017dbe1f73da5d5c5e
MD5 109dfe594152b9ab28266447d00b633b
BLAKE2b-256 14bae219e9d4475c747c142d608b84871ef7333ec078e89196d89a138fd677bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.21-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8576995720554c5a2c7f3817f7f19134e4eab6f1e84ec4499afecea153be8c4a
MD5 e2695427b3ad4592e7f8754097797f27
BLAKE2b-256 c748d479c1f2b1712c803f1ccec6fbf0a6452e771bf9c749c39ff61b946a7283

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