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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ Windows x86

japanese_address_parser_py-0.1.19-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.19-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.19-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.19-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.19-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.19-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.19-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.19-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.19.tar.gz.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19.tar.gz
Algorithm Hash digest
SHA256 210356a7140b75288265a61f7519b5f7d35f4287c10f4ffdc15fadac21c396e8
MD5 24b6bd0edc62a669d88eb8ab8409efc8
BLAKE2b-256 9734b862b0201844e57be7f11b6d59bf96294b46aa0c68df2e51ecdb08d1f818

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b7336e27167fce61f8b3e85e0494fe431f8736023d9f6b41b02159cdde92ccf5
MD5 452fea411a1d121c1efc8df7a1cc6f61
BLAKE2b-256 c44d663bb6dab3a087f84974950aa581c733836abe4045773e331ea5d3f8fc49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 2fc6fb127ff9b953332ed0a479791a6b0a721949b6bb725994662b148625c89b
MD5 c88574222d8a5f45dc4235446d8084c3
BLAKE2b-256 21d270432699ee75d4baa42d9513824b8b8dcb119604e3142d1f3aaa19693a33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f8a27187fcd1c00ae9ace4e8692528799fb73af9234472052151e6fd68f36e0e
MD5 3702ec8402f95b8e37e73d463758ac24
BLAKE2b-256 23504b4c5f6c8ed2d71e2ee111a5f5126f7df7cd91e0d53ba1cbfa025cc82dd2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 1bd1083d1a56ef0bb9b82c13212f08d9553e1bc56bbb92f9fab7c86f58fd204b
MD5 230e714475fd9b47973f085a6ab0bbe6
BLAKE2b-256 bce6fd6ba37b4ea25da5fcc217466c3f39b25c4cff9546788c0f7d1acb06aed4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 4fc7f07c868e335e27c1ee79c15d7085569e266d939444177f4853cbc9d9f068
MD5 de982fa1414691c90c7f781478a5e096
BLAKE2b-256 6e3cbc0eb39865075a09e6565a05906d15c28fa21bf308f81a54b4ca5cce439f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 db36df684db7c226fafb151bdb53fd0bbd72903e388e0be01b19fa180947e5fd
MD5 6baed9a87084f450599b9f020175b946
BLAKE2b-256 0f589553dcc6559978f94528d9a128aa19cbd07372916589d58d6eb730343130

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3ae88cca3ccb5d608ac22dad3817fe9e825fcc1c36e28dc73e44991be85f293c
MD5 ccd09af882f490748314ef5fbd104472
BLAKE2b-256 895f8f5645106b231ca4043142e1a7f039050c4ca27b4b1719c1714b855df352

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 4551c74a87facc02fc321b389bde969c750b10d52f26e318e0630523e6a1dfde
MD5 b81c0508a2aff56214193d00e5e62815
BLAKE2b-256 26c384a5731ec94a21b102663d4504893a6b15117a4602dacd65aaf47cc602cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ed298e02bfa76107de5c924117daa5c36f4979e76e44135b4580d7555f4364ca
MD5 69c48fd37ea07e0751f89d8003b6a751
BLAKE2b-256 7e753eb0b9335743a48d73da2144eff60a2a90f77d6c433ce71e76548270f63c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.19-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4d442c20198575bce5f6e58d3fc5a15c01314d1943fc4c6b600b2cc592c76506
MD5 f5ff3b975951c5979fd4748c5c20e35f
BLAKE2b-256 aee5e7f8eeee77d023693e95be4574e0a779c8fd80de446a160c54a78213b901

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