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

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ Windows x86

japanese_address_parser_py-0.1.20-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.20-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.20-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.20-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.20-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.20-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.20-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.20-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.20.tar.gz.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20.tar.gz
Algorithm Hash digest
SHA256 718c2c0a84c73dbdebe6864872a2f0cb119311282659d454bd308c744a6b13a0
MD5 5b8ae2fe37e32d8e2d7ce08e31bb9257
BLAKE2b-256 958b00af5d2eab8b7a670a99812c6ee644391618993982312ed1aa31bc151e89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b60944016385d9ec5eb134afe8910b6e6dc5c8c971b384694ffb5fbc5e63c80d
MD5 f9f67ea195248bb8bf8cddfa05e68976
BLAKE2b-256 06f488f3fe9d345af083dab2edb01c41842300dedc3d92dc403e1b73237fb53c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 c29f42f97a920eeeff3a76237ca0f8ae42bf6f5275939747864cfc9cb20fdb9a
MD5 09e50ac7eabba6ca840a64e97f10ed15
BLAKE2b-256 0dcf8bc27c9d03cfa30877321be6590977cef67cb71f7c168d07154e9fc7605f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7c3e09e4779c0b0ca04ae29cfedffb282f1c2e25842f35227541d8efc26bbeac
MD5 614a265957d1763209703ce100829a08
BLAKE2b-256 4b8ae5d2a609cabb3aafefa71e3cefddd1556290ac2bbfc462cb149eaef23979

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 22d14025e0a875c1cbc3ce7b15c2e27dd125887ca861ccef9be2b971b10bbc9b
MD5 860d65d0bcb064b6439b9233e73706b0
BLAKE2b-256 be0c147841a6e266d05eded194150108a91790bf0dc109423a2a030afb6cc3b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 c7ce96136903081a326808fbf07e7aff16674882c1616717a372862e8de83eac
MD5 d1581d566daa7b28e500d99cb5d5f83b
BLAKE2b-256 86a0530d488cb564207c29d2d97e84430eb224a3dd352e71a3b966831cf166cd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4657c9ae038228b82c7ad791dd2be65698633b2899ab2c2419bf54910faca368
MD5 38b52e8a1c6a21059fa3ef584eb7ed9f
BLAKE2b-256 8069c3c650672c2da6fdc741ccf064d88e6b9044fb6239081a1ae241de992a49

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 3071c3f5e80bd790b5ac0f619e69e3628a24585f7d39ea58af6f06f3d913ddf1
MD5 c816e283ce3b396279bda9a3657c35cc
BLAKE2b-256 434496d511acd236a9b56a329e900df345df9e3506f9a712cfc98d2eb73264f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b53c95f7581893fcda86c7c036805b6ff2484d596eb9a25ebe12662269d678dd
MD5 774bf47bd3ea1915a541312350a0f1be
BLAKE2b-256 688ea239f83d375d73dd033cef85a7bee1ab8feafda59a8344cdd6eec1c7a0da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e750d9efeec5620f9bb775b65f3f78ad9040e110a8f4ce1e2342571b9dfa5cdf
MD5 2b90313f2a1b580ab3ec0cfc339d209f
BLAKE2b-256 bc5d146ddeb824d205d94bb9fdb49e456f93e137bf9bf357669500264753fd74

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.1.20-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b2275d75393688a726d60130e038dff849f1dda317e7f7a5c6a750bc59e12817
MD5 e39f44d46b96c5a084fbde491f39dc12
BLAKE2b-256 d4bb139d2b9cff2bee30c51949d12d162d370b0bf757ac5d3c86c492f7fc5410

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