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.16.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 301ef1d0476abc12dbba90eda04ae605762005bf3f486f5efa8a49a0bfedbfb2 |
|
MD5 | cfde3be534e763ec2ec7467316bb134a |
|
BLAKE2b-256 | adf6a05fb0463090f955eba8b774c4a8ef760a61cea305a5ba86ad506865a6e4 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38670d2dac9c0bfd8b73e9c7c2d505d68dc4f06d2da2b6aec1d4e25d6e6cfb12 |
|
MD5 | d3ec1fe0f944cf3343d3b0d607178aaa |
|
BLAKE2b-256 | 214fbebf59f49244eddc819cf4f64cbd9cdb1021d0ae5d815238bed147bf5a53 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f06da7bf203fe427533f5c06394cab044b161c7a6ef9725bef256458cf6bd36b |
|
MD5 | 17ef0258dacd346cb881dea0bd8894c5 |
|
BLAKE2b-256 | 0073d5e60da19a068f334ebf572ea28c7a3aff8628547dfb55a005fc27f23556 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ebb5ab90c30a248608f20b1b800fcba667d9beb5293dcbebb5c29427cef5313 |
|
MD5 | 18f324b402ec108e56a29fe3a60077c2 |
|
BLAKE2b-256 | b7e6aba64e9dcd3f6db891f0b212556c44cac5e52105e293e05554c9ff95a958 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 164210017ac5a1c4ae2dd8604e1edbd28867d4b82ec1475709073ebe1037582e |
|
MD5 | 30bd5cef51cc6a5556a33817f1f688cf |
|
BLAKE2b-256 | b52beddb3f7bd7aeb54628d88f294125fca3170938628a7bb65b4f2e56f79840 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a9f7e9c7ab79a261dbcbc053ca8fc057462c0d12fbb33e3f288c6f929c3eb98 |
|
MD5 | b7ab8d2640e59e884cef1b66bdda9fd5 |
|
BLAKE2b-256 | ba2a606f8462d2d46a45ee7aae4b3f90b44096bf7767e2ab2da72346bf5b3f59 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 076bc215b0b9be6dd4851aa48f4a16980644dbf510b2ab365e740fcb30c1092c |
|
MD5 | 079b07a21e2feb8c9a84e5b593e08776 |
|
BLAKE2b-256 | dfbef2138b5d22dfaa67420ca61b1d2e0b47dbfd5fcaa1fce7d4ce893f24f775 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36ff99de5c181cfcc983c714e3e5791f2f9b46ceacf3e0992eb5e94899043f82 |
|
MD5 | 66936cde1329ac7ee337e0a3525d6eef |
|
BLAKE2b-256 | d08e249fd8aa6c1d2538c82b360239b835cc06fd44eff5471faa0dc41f994047 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 699f01db4098dfeccb2e73a8f7506b293edbbcee6f1c668884cda75df63e1d18 |
|
MD5 | 02f26380c303f078285438ba9a47af38 |
|
BLAKE2b-256 | e504f76a6a0edaabed173729265f770dd0560b6edf357269cb090d52e37c1dbc |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f54cb9402c55c734b86a9d7c8a6bb776a5aae963d2b7e8351ceb2ee60248258f |
|
MD5 | f6425b57ef5e69a6000277b02af75446 |
|
BLAKE2b-256 | d86f4d2ff96dc134ca94071f717b5291490f09563bcc6b68d44b18328528e313 |
Hashes for japanese_address_parser_py-0.1.16-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 962b5822519656fdd03eafe5e358dd22f991eb8d9eb1db72d565a2a5b9d7b0ea |
|
MD5 | 7142c54f1ace8c93c3d5d3acd02c8b92 |
|
BLAKE2b-256 | 1a5dd8a34174adaa51e1f6b3d2f5db020fc69bb7cd43fdf1043ff2d74deed98b |