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.0rc2.tar.gz (45.9 kB view details)

Uploaded Source

Built Distributions

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

Uploaded CPython 3.7+ Windows x86-64

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

Uploaded CPython 3.7+ Windows x86

japanese_address_parser_py-0.2.0rc2-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.0rc2-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.0rc2-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.0rc2-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.0rc2-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.2.0rc2-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.0rc2-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.0rc2-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.0rc2.tar.gz.

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2.tar.gz
Algorithm Hash digest
SHA256 1c5eebf7ac038b9a7ede8fe1fc290fd5985baf2ef7bb27a72a8ade521ed94c64
MD5 5f3e871582138364299c1f09e1810f9b
BLAKE2b-256 f80f9e851158d041a6f8b7ba80cd069bdd0cf0b39e901c29822fb8a63b3ccdc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3ebdaafbc105eb7337e02258482ef3f0372fcdb891881a8e74b6f6f39dca6caf
MD5 905e997bcd75443eb060b0945828c8b2
BLAKE2b-256 41953398a617a44d665b62e8a5d5d580012a1e25cb67af4d99a74322d4df25b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 ab5e79155d750ee1782da41c47cdb2cbaf0dc97aab7d4f633b3bec4a5bf0e915
MD5 3a48b636377245f0e73d3fd77770d3eb
BLAKE2b-256 9b80f222ca05c79a5a68418c785eed5a4492181da5b919ebe9b76020e18f24d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2eda4c363d4b3b29dcaceb05b1fbb8285e49de7d407fb07b0629e7086c31db9a
MD5 dca99283b23a4e88261ea1b10edf542f
BLAKE2b-256 58579c96f9b30fccaab188d2ccef242adb44f73ebad7fd5569ece967775786b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 e934306dafc90a6d379b48f36559d0fc21ce521ee4331c88710751e4ed58f7b8
MD5 3b20edb6dea91ac08ac3c9f598b8f155
BLAKE2b-256 fc80a348e45dc6f308af1e007949b4913873fe8e8ed328f9b5d991e80879dd9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 b00732338a1a8107798fc4c5646965273f55e8056c20435fd235e3c3951e03a3
MD5 eb60c309a01d69fea883204630ae311e
BLAKE2b-256 5e17146ff846027612ee0a5be5da3828f20f37f31b9f91aaaf93d818dd36a109

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 977ba85ef2259cd9855af3197cc09642f2b9382be20b88d978823f7d4cad062e
MD5 54f40910dac08587aa18c8d6be80ba79
BLAKE2b-256 05dfb1fe385c1dd82db68c947f4c5e10ba125994e3361736510d8181dc31259e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 9267edcf95c4bbf59e9b334595456cef92b9ed0dd57610da019e9ba74c869e95
MD5 002e951f80c827b218253e6d9ecbb40a
BLAKE2b-256 c08df9248e1983785098e16be6f3912e6cd1208c21b847cbe59c6649b9ec4f9b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7106f19cf59ee10a430864e965d6b806957b9f23122195713cf1aa6b842988a1
MD5 52dc9e1c15e804812b57f89665b8cbf2
BLAKE2b-256 e94329b9caab26339a70d40178e0944e7c72a34e8ab674564e6e02f08e731be2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2b5b4a134eb8ca791f62412e1889e39dc20354801a0a7e1fbc1b3b3c334fba6b
MD5 8902e428354f48df4d75ef756c3e5701
BLAKE2b-256 9bb0b6e7affdb4d8b298ff388e721a41c7faa426b1b43228f381d1d4823eb557

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for japanese_address_parser_py-0.2.0rc2-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2918a41381a0e9a2c7e29453b2d2b3afcea5d2c421f3809f36f64ac5e04f5c4f
MD5 4e05e47a6ffe271124eb1d84d889ede7
BLAKE2b-256 d3a5772964d04a9bc57750c227b04b2192b73da247656b6fb64d7280a1863f29

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