A Rust Library to parse japanses 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.0b11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ffdacf14e3332dffa439d3ba2342f7047628a11385110fbdeaa90bf37b274a4 |
|
MD5 | 0e5561a769917780d70e639f688472e2 |
|
BLAKE2b-256 | cff2ad221f8dec9f43f37703758fa73d0d146e323da522ae2da2f2ac00db0eb4 |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1875034ad4d91de47e2cd65195a246a7e8810511a60a59fb11db130df1e12169 |
|
MD5 | 5b1258d24b8246a0cf25822a606e417c |
|
BLAKE2b-256 | 2ed9a73b490707837c76d70990734a73d8ac8e974bf41aadaa0d43347ba79424 |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4230fc91b0f46a554a8676cfe14d64240f86105555237a9ce1b9c361ba84537 |
|
MD5 | c399cce2f6c0a45a4e0ecbfa2f152318 |
|
BLAKE2b-256 | 1051466a1f9b0926995b7a5bd42a0ee5e2cc8440442caca55705d7de0086ca1c |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e8248b51cc7bb843dc7c5098f38bbb7b28be9dee5b857063dd5d7bd5ace088b |
|
MD5 | 41f430b7b264b1f5dd8927dbc6c4c038 |
|
BLAKE2b-256 | 7db0ca045ac62fdd7a0da749f2b70c0bbdab2b85caa6468c92d5979643b86894 |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ed2d7ac0fd72b483fe9e0e60fb785a61d5efe5e287f78b233019305288607638 |
|
MD5 | e80801065a46a063c4505ce43c309c04 |
|
BLAKE2b-256 | bdf0484153b2937ae090fec131ad25bc5af3921e7e99ab5423164c3f0c63764a |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1819223ed2cdef8a2c229db2b675045d9bd6a301b8765cc92d53c10d65d8bef9 |
|
MD5 | dece1529a4bfba23ce823e5e48d91d6d |
|
BLAKE2b-256 | 1c61d56e8aca209c653f6787cb4edb53177ffca5d4b9c7477af598f93fe81d21 |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcfe29852bb1be118b61d37c762e05b43e5a517598dd272a3b519a7234ddbd80 |
|
MD5 | 9889f78315d7165f371381686e7104d1 |
|
BLAKE2b-256 | 2b63122440c7264c8c4e2b20097fc2f9daaa7bb4ab58e203f16c6302d9181ab5 |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4520c53603cebf3259c9ccb0c63fe17164188a67d25fa8273399b6c4e2299cb |
|
MD5 | d3fa17b38502ea5b77553530fba55d82 |
|
BLAKE2b-256 | 803240c4fc9140bd7d914e8e8e1272d5bb7057435e55f3ceff45d38920bd55aa |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4528392b1acb115c48996232208238d992804a82e7e4f215813870a98f47b32 |
|
MD5 | bf117818025136aaa25380cbc2fde201 |
|
BLAKE2b-256 | d069651efcdef486544c048b8f53c1a6014b4eb723b58ff854042e0278dec10d |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9871bc5752dcf136dc5594f5e58bf0fd7c43edd28a8c8b241716db8ecb5ce35 |
|
MD5 | 7d4c3d36edb7aa8c822b9ebd91d8bf13 |
|
BLAKE2b-256 | 55bd2bf10a182fefd005be79680c1e33998836b790165635b3ac3ba6788c39a1 |
Hashes for japanese_address_parser_py-0.1.0b11-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58db8684f186a7a6d70c3e45c336bb94093915b5112c5fe39a3e691d2a86632b |
|
MD5 | b79c3be4cb288e96510df9de7723bb49 |
|
BLAKE2b-256 | 62a28ef2c64bd8df080c77e4851dbd70bce7f10255754004367aac72fed0773a |