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.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | a07c3fac27cd947cce8d4ccd3f13884dcc60c1a208620b18deb32c5e41929e7f |
|
MD5 | 5c854b496e1f829d0f9d50cfb4f58e0a |
|
BLAKE2b-256 | d3af163791f8c351a931abc023312815e7baa86ae0537c9b632504b0a865da1c |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a547d5476401afc7591e931cc6171123578e3f7d5af33eb9bbb565a4d02ac1ac |
|
MD5 | 9965ad41ab13e160ceeeac53f1b6295b |
|
BLAKE2b-256 | 7400602006246b0ea0a3888b34ef4559a8bffb777a10428792ede6e09abbbd7a |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3eda76adde6ca0887ab5e915e025478221c11f899a964c2154cdfc647f48456c |
|
MD5 | 5d2aecf0a0c6e3121e0f5cf7a40e2ba9 |
|
BLAKE2b-256 | eff3f42cc70ecfa88e0acee1586b2bb91010c41c67727cc1a8e0e659ab5372b3 |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fdb54e13fe369367a23400fc21216459652864580f3297fefa55321130a960dd |
|
MD5 | 5346abcc8fd8afbee8ac281c4bcf88a3 |
|
BLAKE2b-256 | 122754ac99cac6e015301c54124d478587877c8b6f5747d2d1106cda04f1dd1e |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cc45c7690144afc4e4835fa1a6d75ba386b4b89db0f887a5ea781586dbcfe90 |
|
MD5 | 5153a9c184d3d59eb0dc0374b096e6d7 |
|
BLAKE2b-256 | bfcf2afd27e841fce5dbee96e05c3e9d1f4f8dffd726772cd3a6a56fdcd99f27 |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d58e68ebeece8607b6ba53ad227efd12ee28dad759a99fb0fd96c37bbb4b5731 |
|
MD5 | 176953cf21d6b544842649f3dd0e5a34 |
|
BLAKE2b-256 | c7119f5a3de6b333727f3964580f0f4117fcdd24a2bbabc60e19118b6838104f |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb4f4825a723872890f916c6b9ea1ae573010cb93c0d3272b990a9e45764bd0a |
|
MD5 | d320692f2a31b4f309b5a8cdd6417201 |
|
BLAKE2b-256 | 6dd41d680ae80d9aa75086ef8b574bb8e8111cf57201d28edd295232f90d0813 |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4edce4fafc54dc878b88c16347b45a3c34a36e961a6d58a6aa5ccc66b51cb5c |
|
MD5 | 050a142bf192e9e600c382ce134c9da3 |
|
BLAKE2b-256 | b6ced05f16238707bc760113fd9dc11dad43241c4ac110c74acd10a5ac4129e8 |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25c9b8c574effe66ac91c3a103aa821ae08a490ce4c709f67be8a2dde923b3ed |
|
MD5 | a39b10bd170c05f3e87f1ff40d29f943 |
|
BLAKE2b-256 | d60ba73b878201e25b0a6654b82b207f04c8191e9b0d0e6da33b4f7f1842c991 |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f3c299dfb5560c234d874ba93b2f19b6c3f1c4b2c3775a00f096a0c0f38cf52b |
|
MD5 | 5278d22469cb5fae31658e329fbec079 |
|
BLAKE2b-256 | 1bec6eb859a894d197e014163258b5f4dfd0dc2376efc3f2602adee8bb141381 |
Hashes for japanese_address_parser_py-0.1.5-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8eaf2d882505c82addf67c3e007868a4f3460742a2ec8357df70e02c5415983e |
|
MD5 | cf9aa3281802dfb34c9c4e0492fd718f |
|
BLAKE2b-256 | fb20d333e57d9f87469536c2b958945d1d68f9b68024f0071c062fe86f8b2506 |