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
import japanese_address_parser_py
address_list = [
"埼玉県さいたま市浦和区高砂3-15-1",
"千葉県千葉市中央区市場町1-1",
"東京都新宿区西新宿2-8-1",
"神奈川県横浜市中区日本大通1"
]
for address in address_list:
parse_result = japanese_address_parser_py.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'}
import japanese_address_parser_py
address = "神奈川県横浜市中区本町6丁目50-10"
parse_result = japanese_address_parser_py.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.0b15.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9583db2223b32335c4cc1898d60b11d7dde67fb7b45f98055dd6e76970344093 |
|
MD5 | e1a27ac1f0478e75b7f0ad5863fb590f |
|
BLAKE2b-256 | 3d1828526cef1b0c5db7f240b837d0848677abbc6cd2e117521600eb25b6ec67 |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cb0014808156ccebb27db8d68ec10e16170c1bcc2686110f1313db967b23b40 |
|
MD5 | 1af6e82b3908654b4c754e6a0966a8a0 |
|
BLAKE2b-256 | 81d9265c3ab62d67c4a232690f035d2f6bc8f6346cc86c2c55896b0435d3c37b |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d81ccbcd442ba6dd5de96b1efa7bcc2d37b9eebedd002726188fd207fb139aa4 |
|
MD5 | 4556ba48075ef9008b14f32636a7b360 |
|
BLAKE2b-256 | 4a1044b1252c5a051ef5f1ae11b18d8e5e40ba69e6dbcc49ee87c1b42c0f0bfc |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e20483cfe30ca03671d6b7f0d531fce328ff70c3cb8aee9d411cda31ae6f3d5c |
|
MD5 | 740e16414a189059706803d764bf5ccd |
|
BLAKE2b-256 | c59f483aef6be5aeab8c4b92a6793741038a88e543a8f01d6a743c4cc419d434 |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6a52028d23fa2058f04865474cb2f717d5c61a886be654663435f05505dd24c |
|
MD5 | f10fbd60b9c021257606ccf483529fd2 |
|
BLAKE2b-256 | 48c1e738759186f5d6ee9c03fe63f9876f7ceacd9d369fa342103b2f74f8daf0 |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b3151ff75113b9c7ca0c34a2d7f748d93b39abff9c9cceb00636b0c5d62600e |
|
MD5 | a8fff03505448c9c7262e21f6e50adb8 |
|
BLAKE2b-256 | 0095eafad18739cd7e733abb4db4869a3ec4416f7d38443d7c87e2f0178e65bd |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ea874ef00052230fb5cedd1d1524713ba0cc95737f5dfeac5dcb1e32c6d6a910 |
|
MD5 | 23c8a237abaf7985642d950a2a026d09 |
|
BLAKE2b-256 | 99d4bc0f5e7fe3f843b4c77b68a75d10008b5c49b19a4232d0ac4cebfc892d6a |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c9addce018a5c43ee83aa45f5aae1de4b3755f5ad6e6d22c95ddfea34800611 |
|
MD5 | d0e63f08c8300ce2bdabf17ea644fead |
|
BLAKE2b-256 | 845f74c464c4a6fe1c0522775e1b5c63a462e22700cd45d4b2e6ee1631bb6737 |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43f05004984219c0253883a1b53a58e19727c23880250950ad4f844434ea2142 |
|
MD5 | a31201293edf3b30501ef081c1d1ae9c |
|
BLAKE2b-256 | 9e22d43d85a81569d7c51442d7415be2ad9706bada278eb514b29ea38fd9dce0 |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b955571aaae0563848a2f8d72890d115433dfb3f1c36360045ec6c85e7e38bb5 |
|
MD5 | dcf9cc339f31ca9b728beb23f85b4ea6 |
|
BLAKE2b-256 | 818239b5480c4b8ab968a62d1f90cac1ba5cd8bcc4cc3537f7dbdcca2c6d5640 |
Hashes for japanese_address_parser_py-0.1.0b15-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6561ef2d601b021931874583e74b997a93485e5248d27f6d03697dba1b85147 |
|
MD5 | 4f8b4715597d3377f99bef3ec399fabd |
|
BLAKE2b-256 | 067c4ec06eb4aa4d93798ef51000f55c46b0d9980acc171e04fc9c35479fe04a |