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.3rc1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef04bed1ccd67e912ce16a1d95e1c12236a157447981d5c39b67914414571849 |
|
MD5 | d97fc2c566815194ebecec9d35012676 |
|
BLAKE2b-256 | d470c54ca57018371e0d867ffa5ac1d0b5d140dae703c46bc4aad70f27983309 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | badb8f53430fcf8f57fede667113d1a50baca329cd5e077617bbbbd9bb2160ca |
|
MD5 | 2f6dbfac65619700263b2b948ad102e8 |
|
BLAKE2b-256 | bae2f3cd8b3561f0edabdb901084ef9472be4c1a292a24fe569e4f69739f8855 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2231b2085134c47eff16ed912f79fd5c74971ccd7d4347bedb93b5206142a910 |
|
MD5 | 41885d89296267eb0dfc8549efd0f730 |
|
BLAKE2b-256 | 3ca03dce0fdfc74495c6ccbc2642ddcedb4a2182c1ca1a963d02d5b157bda251 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dace47468d8aa6052b5445fd8554c02cac106d5bd240688ab3ff95ff6cf06301 |
|
MD5 | b9012472d0a4bcfebb6d07dc9e151b8d |
|
BLAKE2b-256 | fbccba734533c436200d1b70cafe7e2533c87f1f1ba40b87e318c309b2d0c7c0 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c891fcdb091561e692de486464aa35e021e23b9ddf4cf9233d4fe1b4e924a584 |
|
MD5 | 0aedfabe6067a1db1f3ec1e788bd0b1f |
|
BLAKE2b-256 | 09753ebf64166ec2b5ed0070b799a65cdad5aa31c0a27ca272e2867551263ff3 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9699893a39471a571bdd2c7d6f8a80af25c4eac0c241851f2da79b9bf194541 |
|
MD5 | e4b1b4f5be2cd94f72154395d3b0756f |
|
BLAKE2b-256 | 722abd5cab36a2a231b1829242429a379a41273f1cda790453bdb42dc92eb295 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e14d6c110705871c9d12dc5d797a20cf5f2d518e6dceeeec3e31753387d1f48 |
|
MD5 | 96b5890da9aeffe7dc96eae8f9eb6e5a |
|
BLAKE2b-256 | 9efbe85fc5cc44a8112448746e400e2f44651d8312547b6e8a3e94a20fa4385f |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efdc0d4d1ed7afa97b9c87837e9773ba364bd4c97f8551835abc58ea406bbc8b |
|
MD5 | c3a2797b1137c29e855aa3cd6dac19bb |
|
BLAKE2b-256 | 53b8cb16b5afdd6d5bfaea3abe9190a6a7b2987282ea05e53cebac33cf365779 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ddf1a58203d8986fc0f8dfab4a85293ae846a127b074bf8e499783aa9224337 |
|
MD5 | f3d551e45587c55bea7f93321c355c59 |
|
BLAKE2b-256 | ba4a0aa1c586d13f1d339c187aaaa725632c82ae0952ed21c7a425c8f4a66be8 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c9c9488ad73d37f48fe1b0554c65475556a9222f0314220b0e20d5d46336a32 |
|
MD5 | 6de3d06821c80019e19f146fe1638605 |
|
BLAKE2b-256 | 24d709389aa907a958e4c4ef3f813ab08403c8758938e9a15e6936ff1c476a12 |
Hashes for japanese_address_parser_py-0.1.3rc1-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 17f5659120b89be13a8a26f1e93df3237c5545433501d2eb585bcb94e1c1813d |
|
MD5 | d49cc9a450f18cd90dea1e04a038590e |
|
BLAKE2b-256 | a61da8532a9df2a3f982f9b1528734fcf044e520bccff57ac1b7931848212ccf |