A Rust Library to parse japanese addresses.
Project description
japanese-address-parser-py
A python toolkit for processing japanese addresses
What is it?
japanese-address-parser-py is a Python package for parsing japanese addresses. Any address can be processed 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 language. You need to set up a Rust development environment to build this library.
Also, you need to install maturin
because 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 questions, please create an 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 developed inspired
by @geolonia/normalize-japanese-addresses.
Also, the parsing process uses Geolonia 住所データ provided
by 株式会社Geolonia.
License
This crate is distributed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for japanese_address_parser_py-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 885097c731262aa8c5e6edcef9b29fc115db7a64975e602530b5ddf5c79ff94d |
|
MD5 | 48b7aefecd763219bdd8c78c45d06924 |
|
BLAKE2b-256 | ad4611d11097ad8fa1404cab8c3f6d323e07e9978de39ce37448a935a098bf51 |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31239114999b982bafc7c6554a5cf4271588ed077594cf4a3a5606efe484a98f |
|
MD5 | ed8431d6470b9b46c07fae7977ff6c2e |
|
BLAKE2b-256 | 1febf3adb81c5543f6b16e3ea93155f6a0108bb007ed17a42d83de35aa555316 |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2b9d8a93abf307f6644c7c1746d65c9d254ce65c598d58053abe0782eb64c69e |
|
MD5 | 859bc0b87149f7064db07fc0fd64a89c |
|
BLAKE2b-256 | f94125a3b627237ffc14e3a2c443b94639bd783db262ab179960f498d08ec5ac |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 458c9ba81c3373d10fae4829ec537fcc5d0283d8b42abbe33ff77a02ce0648ed |
|
MD5 | 4414135f3e7ea1bbf033fa638225d947 |
|
BLAKE2b-256 | 163a1c4b6927e5a329ef2444ad6bd52d4cc5a72b2874390e987b489c974f5880 |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6eb53444ba6dfb5596128f02f6a7cd266249c833a170c09f732575348b4d831 |
|
MD5 | 4b5d5c7364937f6d24cc4a2988ad8185 |
|
BLAKE2b-256 | d8f791a0c9eda247aff9f6fef053fa7f9d91cd683a785e683ee476de75c8f1dd |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16786adeef12c57a2dfe764db5dff16e922a204dc26f96ca3ed82ea40322c087 |
|
MD5 | 99b7eae9f972ac11c68d4d75d9d7c27d |
|
BLAKE2b-256 | 3aae6fc5f80466ce1dc413ae9d486e273e6efb6e947abc5b295739573b3a647c |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c46ae56b3fcd2e2595f763398a03fca64810f3db080158927c0ae4d0aa80cc5 |
|
MD5 | fe89182f1ea40e61c5812bd1720fe742 |
|
BLAKE2b-256 | c72008a43abf7a18e24c72af29c5b3a7927098924ff950e86fb02d0458ce7921 |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f5bac09cd59d5e1fc46ba9af320823d3285f10fe375bbe3ab73e5b5a82db2a |
|
MD5 | 5a69279492abb35b48da6551e296b78c |
|
BLAKE2b-256 | 6945a2934f3714d9536b507583f3635bfc050d98350a88d1f0eb91e298f05f3c |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c85a6f10ef5ec099fc0f66fcc1ecd464a892d33c2fa673b5f76a80947d61ebc |
|
MD5 | 5cb684aae8c13c04048b151939b9352e |
|
BLAKE2b-256 | b34e0edd7233befb124430e9d1f24548546f39731b6c1c4800dd3cbbbe906713 |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b8e57e2221ba204dedc80bfe6dcc19007bc484fc1d44b6292f77de46dc01e59 |
|
MD5 | b2dff4f4d73f96bee6a19adad2dd0070 |
|
BLAKE2b-256 | fe4062495d1bef3456f0daceeeba66b2b081ca42442a2311922e4d5951c01f68 |
Hashes for japanese_address_parser_py-0.1.4-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e6878c1c8e07f8dcbb24f449c46492c570e63ead7fcda28f59924f47a3298a36 |
|
MD5 | 832248c7b25b022fdc56ce44003d2d9e |
|
BLAKE2b-256 | e0ec85e44f5955a5711bfcaafc4fe31a36247e01b8b9da20f0399fed65cd1184 |