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.3rc3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f0e96e884a75b913ad70f757c65971d086b47080904f4bbf05d795b18352fa4 |
|
MD5 | 58984f10284181d60a7f3d790d6b9812 |
|
BLAKE2b-256 | 8dd1039f195847a654b4b0741b4f21a9885344f8946460f5c3490c7c8ba33521 |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04ca4edfce6b9009c689b878ca205d90485363601f3f4943b93a08ed93e0f8c8 |
|
MD5 | dcf5dc9e47c1e2e9f70f412527250af2 |
|
BLAKE2b-256 | 499c63ae7e5b6ca3d25c4f6264cc8b85357798087f47a111e1331c58c5ec59ac |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b567f7c1d13e3c57a92ff253c65e1f956abeb4adb4d8e7c9b3afccdf0e8519b |
|
MD5 | 5f11cd9dc3beb073d86ffb1e3e4a73c2 |
|
BLAKE2b-256 | 26f40891091b16dc272cc79d3297adcd34a0a484df79d567b776e46e2c12eec0 |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1331298639cb9b8e809a35996e75da02d6fad7b78e97e8d883a3d8beaa8dd39 |
|
MD5 | 31bbdfa282546aa94d7c6b8eb45541d9 |
|
BLAKE2b-256 | 1a4e18c47eb530d942adb8c144ae3708972e3af18c7cc05f0e3b60c56343c74b |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e55abc6ef34dc3b8cb270fa43bbf2e1274bc23379e5623c379c866a5f8e2de6b |
|
MD5 | 6b17c0f1f46286ed6603282de05cd708 |
|
BLAKE2b-256 | 4d15344706feae6d437f20f9271621b44390744eecaa9028fc336f40b8f1b5b0 |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f882fe394f204de581081e52a21d1f4a22592860121ddda94954bab48263c1c7 |
|
MD5 | 2dbac249761ac0b5d112662bbabee7e2 |
|
BLAKE2b-256 | 8b92b3f501eedcecf657cc782be186e311fb30f385833c84d6af4855848e69d5 |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2daf12da5b8177f01b3f35a264b369b6b27669f317cb55e66a658b5896cb64d4 |
|
MD5 | ec2f32c966243a6eee30dcba67bb851c |
|
BLAKE2b-256 | 2b7dfe04c3345dd46fdd13e7618588c81f105ae6afedcbb9d25ae74122e46bea |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4add2de468258cd30cf61897c9c6ed616405634bf06b67844da418bde29ac994 |
|
MD5 | b3996bc2cd556ea5f0385018e61880f2 |
|
BLAKE2b-256 | 10a59f2c884a2b8dc89f7ec5d8d0297b7a104e3b1d0db22c36d87369c9eab9f9 |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7a8c74e6d23636ec3455429054aa4db6b4a5ff631a18e582c617f4489008cb5 |
|
MD5 | b724a3b5b37ee7058b6fbe3f4a305cb0 |
|
BLAKE2b-256 | 4df6a293310436bfb1d7fa67b8eef8379346a90d3dc54fdf3dc9ce4461c53b89 |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1292b1d759dace08c8645811a4368a969b827009f621222fb001aa7da56cbbc9 |
|
MD5 | 1b729aa198b9c1daed8eeffb4d232f98 |
|
BLAKE2b-256 | 41c96b53528c65efe1f5236ddf61219150f3d7719f2fe7819c7c95f0cfbfee92 |
Hashes for japanese_address_parser_py-0.1.3rc3-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81caeb5b13329b0930927f0823a98f7951b722f156306b86fa7447c441307002 |
|
MD5 | f7090ee83dd4cf37fa7db1977a206538 |
|
BLAKE2b-256 | ae25215ead62cab7a76b40f98308dc108b9bb56875142a5a33268d7f7cec86f3 |