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.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e13d19636d46c8afb5e90c53e4841b2fefb97f3084a03981430f3852a4189875 |
|
MD5 | 62d798e3321dce55b8d7e78dd0551f1b |
|
BLAKE2b-256 | 8f66a5ff91a43b1fb22cfc4cb8abe9deed5fc739b3a0d035bf6c2ebbd8920bac |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a086b92a8b518b630b97f8cf01683edd4d5c9aa3f2d7ecb64d170918bf962ab7 |
|
MD5 | 9efae5993dfa727f4cb0f3bdfaa54dab |
|
BLAKE2b-256 | 1010d1cfc1916807d4619e7f8f339db21f62291f0cac5ee0d717eac621ff9d7e |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d63de5e3a5b44eefc07d7d9ceb83cb14bbddf075cdc63eb12e3708592fec38e7 |
|
MD5 | c2a91cf06a494f6f85021efdc21e218d |
|
BLAKE2b-256 | 3e13e40b1e34f4182221543e3093f76cabbb00fa538df836cb79d3f5ceac15b6 |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61ae5ddb297b9511663bbc03d66e9110daf3f04be3d9522c144e13590279c09 |
|
MD5 | 4f50e51fbcdd26fb0e4837bd40095c0f |
|
BLAKE2b-256 | d118e1f92f06fbbc81defe70afbe04efcd02212ea3716b663d69c8097e05f198 |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d10573f60401a01f2ead1a591f59dae39c33745b4459f6194fafa0bc44fda587 |
|
MD5 | 30de9b478d19fa38fc473d9d1c3ef62a |
|
BLAKE2b-256 | d05350ffc4769f1ed9479a51e7b1dc8a8218f9db22d63aaf32060e393e45d617 |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73502ee513e2917d7e337a26f8919ea8e040d673676c9b58bb19bd4a88feef25 |
|
MD5 | c6e2319ce608cc972e4c8287a6432a00 |
|
BLAKE2b-256 | deec1d8dad97a3727bb5ba9499e4d560bec530a74b50074b36f9614c349fc5dd |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d835bb75a446a34741226102d19fcaa6bed1bb6fa1f96920cd1bc55c0d0d9dfd |
|
MD5 | a98b1da0a06ae9c5429258c8dcdb6231 |
|
BLAKE2b-256 | 50025e1a25096e25c4f0168e7dd55ca4019b65c49ffbd11fbd1d370311edfb5a |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f30f6ffafd652904cc2199de861ccf259beb165e8398a56f48f3a58cd6d65331 |
|
MD5 | f6e084e290651f979a577935066a820a |
|
BLAKE2b-256 | 9d3979184a6a3fce12c658d40659e2409996c596f3c137ece0658a0837469f84 |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9d932a9852cf79c3be248f001f2122f6654cc409a5e7bbfe91b376088320f62 |
|
MD5 | 830ee45cd8d7118fde2a8f9ef50f6602 |
|
BLAKE2b-256 | 4d42f99fd8a797e7e5a057d9d4862aa0e1d1674d6501f47f98d41daa237ba9ae |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e1c00b6c13db508a3b7d10b3bc37ffb54c1ac61c24a0e45b96ce1b4d3974d47 |
|
MD5 | a8c29637ac6c18c278c5f51a6ba7037e |
|
BLAKE2b-256 | 3b3db3a666250a2de8a8eabf4b80075721e0e3049426c2bdca953baf980d8ac1 |
Hashes for japanese_address_parser_py-0.1.14-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a5de806c978950dc3e1d1c261336e57786cd5bc4cc7a2a8bf10c76f9deee723 |
|
MD5 | 55bde753c0843891796704484af169aa |
|
BLAKE2b-256 | 6a3d9fe8f34efa4e14c046f62281143ac72860be62e4bf401f176c50b122048d |