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
import japanese_address_parser_py
address_list = [
"埼玉県さいたま市浦和区高砂3-15-1",
"千葉県千葉市中央区市場町1-1",
"東京都新宿区西新宿2-8-1",
"神奈川県横浜市中区日本大通1"
]
for address in address_list:
parse_result = japanese_address_parser_py.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'}
import japanese_address_parser_py
address = "神奈川県横浜市中区本町6丁目50-10"
parse_result = japanese_address_parser_py.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.0b14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf4b8615460901cc91f2ee76f32df83aca7f51b33b419f66548e0bea644ffb93 |
|
MD5 | 26a764198189c2524451473a10118abd |
|
BLAKE2b-256 | 9f9de21195c38e2ce47c14eacc29f4cd3013b71bf8e5402c9da31ba436ec3f0c |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a99fe2dce59ebf66497667fdbb59ef4c0a320aeb88dbbac84e0dffa4143fe2a1 |
|
MD5 | 8bb5e1de8a8e4fdbb43e2e1610773ecc |
|
BLAKE2b-256 | f205d0cd3067fb5a0320efa2cea256072a8ce7953f109077de38bb310c2b8ab5 |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ec55aa896ac37835fa6344400c059724cdbc0281bcff4125bb8775dd9bf4f16 |
|
MD5 | b07a206aae432296172807eb1a0257a8 |
|
BLAKE2b-256 | 027ff887297df4c46f01bc444474e246562d31a43b3b75d9505ad689949db86d |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5939ccc51697ca0d0ee752b05f4d549bc02f68be24cfe692ec0af2d7761438cc |
|
MD5 | 78f2560cfcd3c8993b8cd4967f278094 |
|
BLAKE2b-256 | fe356d7d9795bfa86b40289b25e4df2888e7dfa14b52ded8452abf88ba3a6545 |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fb52e2bcebe49bf37b0c4b5a06568af562e2f4eb16738f806ab862a05e84d43 |
|
MD5 | 4f47caa7733c7cb460c88c889428129b |
|
BLAKE2b-256 | 6f77a7dc137e35c587edbe9467b2ee7c6daf420c75aa0506f9776bdef093c243 |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58915d4d0fde909b7b9c64a225e79e77f5f6db59f80debbd668dade17c27c20b |
|
MD5 | 950190caf9d2c4c2cefbc459c78bde78 |
|
BLAKE2b-256 | 4ab9036f39fc2ea835a64985452c26ed6d420814cd415b1eb96afae4c2af3b70 |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b77db82ebaabf5eec94b82f8679420bc11212fe6f7151bc7980e2f38d64d5ca9 |
|
MD5 | c4dba74fa2e3463212e05a6732c44623 |
|
BLAKE2b-256 | 8fd93527feef4cebb88e4da6f207b82592a99be48471ab3c132f345cca582cf8 |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 118fe76ead87259425dac3af0eaa199f6fbc24d1189ca559a5f4d3792a91df62 |
|
MD5 | b644300dbe9233e27d8d71a78400e2e7 |
|
BLAKE2b-256 | 591effcd285dd9cab5fb281ab8f99a5064d77be79cb65e84295e4c8f48c2b93f |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16d1b2654c1a26a834a55c0f0f1e37c9377874bed0483d154eb1d89c8589473d |
|
MD5 | 17c5161b3c8ab75e48d73b58c4fd5a70 |
|
BLAKE2b-256 | d0f2cbcd4952b618f9c217fb158772b7e7e7c137476e70465e15b0b4b7976850 |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c8f8f24c2630a50f9e8ecfc18e542f9d91f99708094b6381adfafc987ee6a1a |
|
MD5 | 252c82875a73d46b76236d7bb144003a |
|
BLAKE2b-256 | aacd4202ab3dd9a3f666b584660e48e37443764b67b0e0839d041d497c9b039b |
Hashes for japanese_address_parser_py-0.1.0b14-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d8ed71d176a124e01afef4ad9925c75f58d2cb54a015a55daf77bcbedaf2faa |
|
MD5 | ef96c3541bbd506bf3b58fd355ef65bc |
|
BLAKE2b-256 | 7a20817582b38fd0155d5fb11efd31039627d72d822253ff4a68d3b76c2db776 |