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.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cc94ab34a40ac01e187a26b0e57fb59218c03589c5f37a046f18715fa4742f5 |
|
MD5 | d2c3579c3f86fa462b2bee542739ce8c |
|
BLAKE2b-256 | 1d875360ea9866ba2cc3afc56f88f827c153d5e70ec3a3605e8b3b47f37befc6 |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62da2ced80b83f5c7d4a2a549c7cb0e2b0629a3e68ab887858a3509ab542b559 |
|
MD5 | e5e94b17f12ea6273dbba96849c00461 |
|
BLAKE2b-256 | 448788560a8c15b201084e848791d7c5fb0c93939a76f3d314b8c14d2b5fbc55 |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fc69d21f57b85da6db78a49bff9e0d93d1b9a4890034b9c1e0758ef7c4c93ef |
|
MD5 | 809b7a3a38b7077d80996560039152c2 |
|
BLAKE2b-256 | cbf51b520eb9275a145dab791c826c23dd0b626acdd25998902693deb418447e |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fd5d077b01a390e62e1fd5b3ca064d51523eb41dcf64f60e728e3f5f2902444 |
|
MD5 | 9dc7924eecd3004f649ff59bc756edb8 |
|
BLAKE2b-256 | 46217a02f184a1c9605c9a64849d374ffdaf7a9081e72da62bc10f5cc34dc7d8 |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b07695bed71785b6b299fe08ec6d49b9c06bd1c8cdb34aa97eb077ceabdaaa4 |
|
MD5 | e6569f4a6fb1608a24d7affa73f05405 |
|
BLAKE2b-256 | 650428c6dd8ad2a3661d3f679b003b27b5935568a7a84e123c9694adc0bdcf40 |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 145cb7b56ce0ce2057275e80413d141420cf27ecef5de6642084e738a994ea0a |
|
MD5 | 1f00234fbffb51165864981c06644c7a |
|
BLAKE2b-256 | ec358288cd1a4cd6da04917b0799aece3fe3e15a234be61eb1e880c055b9f744 |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d23d7995731e026dc961a00c8905e1b3de2d3c68c178505009f7cea653c3091 |
|
MD5 | 58898380d4030243dee151ada1092c48 |
|
BLAKE2b-256 | 1eafe2d9dfb78fd4acb452271095bec0b4b6515bfc692f760ece481f482f113c |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8266ea0e074f41804e839059b17843f9e4430ea9b489554d9ca39c485af10e45 |
|
MD5 | c5821ca477b84cd03b1d90547e8e7f69 |
|
BLAKE2b-256 | d6c41c4627220c1fe06779930ec4e2d457ac2d27f835454a635d61d9b943fb82 |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1e29c5e44219cc2ff18c512aaf12166fe19de7a6ac97205c9090c82b4c1e4db |
|
MD5 | 1ea5f5d8ca21a8caf943940c44f00a57 |
|
BLAKE2b-256 | 64f501970315984479341aed404a0db56f3870a3580bc5406a015cdecac13679 |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e93089fdc12ba16698a00e4920451e0fc9d6785953367b0a92d68db6a5586bcd |
|
MD5 | 476d99534fabc4631572fc57d5b20992 |
|
BLAKE2b-256 | 90844e877c0e27359bdecd51333eaa2846fe9ecd7132449536fb6df6457b0ef9 |
Hashes for japanese_address_parser_py-0.1.3-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7dcce4937a8c288070452cac72caa9aec31a8fa28cb005748994732e14281bf |
|
MD5 | a8bcdb55d1fe6ef11c500f2150b4db6c |
|
BLAKE2b-256 | 16b4714eaf3cd6bf25ff89dc942b95bb9cd337ca066c91a60882cc76e4e6878f |