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.3rc2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b78169c723a5b62c931aab5d465344da6d76afe4aa9b89755fb73a0e5d973aa |
|
MD5 | addf4a8a3c53810a8e6b984c66f067bd |
|
BLAKE2b-256 | 200138f94ccf1e1868478f1c4f36a43b025db28def6f76b88bfa84621c92b732 |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fd5a479f7bda953be08b20ffa4f0af220b97f8e4b69150dad60dd6b866a3747 |
|
MD5 | 52b2c08eedd6908393f76edd2ac8a9d1 |
|
BLAKE2b-256 | a0cea83aa26fbe04aca6a0c359a52939795a8ad1204cd6b3ef80302828e60bb9 |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb8dbe62086c9bbbf93eee174e2a3b75831aa687b375d0f534653acb3f4a4b27 |
|
MD5 | 35007f1df9a3a824676ec6546bcdc602 |
|
BLAKE2b-256 | 6272386193367109eb5a17c9dedb5be66a42193892cb0f99b54a6ffbe8ffc978 |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b80f10400d408083411232bf64130a2c267fa6973f40b03afb966e914bd147aa |
|
MD5 | 8061787ca83bd2c21bc3df9d1cea1d43 |
|
BLAKE2b-256 | 2a5386f6dc242a05765e8c864f26f7c8651054318910cf6d4c714467c0f4062e |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e65200b7bf322fcdbe0f6aeb34ea1e1dd39bfe39ed2397b8319667c0d7c8833 |
|
MD5 | 1a16dfed23e6c7a690f5a9c95a1514b5 |
|
BLAKE2b-256 | 506c5230a0b68c26087a018363c253cd9d9a182737ee3670401e32a80f9d64d4 |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 666f1ea0e7a9833f699360f14634446155d5d8018c78360681f27c3365f3d5a7 |
|
MD5 | e8154588606942f3cf627a3fa1b3e956 |
|
BLAKE2b-256 | e004ac404e0bef8d33a9fa64f296b0fa1ac73d97a9ffe7997d8a7c2b3008c761 |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e637dcc3ac9b877a9357e33afa23e6ff2cf8bec8f022bf4de7c8367a1a5fbbf |
|
MD5 | 36fa2191ec5ae705b86bb6b531f255a6 |
|
BLAKE2b-256 | 17370530d819e101ac4db6044028221473981d6d878f241974a32aea2f0e3122 |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54895a4c295c784109ae0c5a6db6e7506b965e5c04cbde0cc6be8ddec3c39b97 |
|
MD5 | af64434c76c7293364803a02567015e2 |
|
BLAKE2b-256 | f441471df012282aacf7f3b195e28093f9434fccb17c6bcdcaba49ca6213dbab |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0b462d7eb01da8c2cf38d6ee65c543981dec5cac6ecf4fa911a51135c9eb076 |
|
MD5 | cb5d9749ccd5c077f9e66d20dcd0769f |
|
BLAKE2b-256 | ac875879204f6218665d519ddb384866580c303625977b780547c8bd90e6477f |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97077184b35c5fdbdf4f9a14df56a2e18d7e6a4ad0639d35e55e842056004b15 |
|
MD5 | fc76f74b19cbf6c686f40c29b2352b8c |
|
BLAKE2b-256 | 9c56d4d7840778dc844a11aaaf839103e2cb789d34e058c4d02c57c1724eb133 |
Hashes for japanese_address_parser_py-0.1.3rc2-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b0445bbd74720c0bf589e01ce3283cafcc694f10d016be94b2bc9c685143662 |
|
MD5 | ff73f02326ce44cb18d0ae0f470469b2 |
|
BLAKE2b-256 | 53d0a0713aa964f2963170e3df430ecb12b430383a93bd1ebd9f0f5171f31047 |