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.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | bed919444fb1925106fc19eadfeb97d010047ef7ad0ef3f0222b36a4d3ba6688 |
|
MD5 | 0fe11349be8e3915549538ebce2574d5 |
|
BLAKE2b-256 | a4b65372b3c15883cfd143b33b72d42aa2610cc347ba30e7f68255552353b6ca |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20f6e8f5c1be25454d4966163064b0d0156e2c306db972de0ccd0048095926ef |
|
MD5 | 6208b4983c124e4a461b508a1d2da0fa |
|
BLAKE2b-256 | 891836633d3060856d332e202cc64e720b33d72082059919982779977239afe0 |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c05f85b148a4e69191f99e9b2d950550452dcbdb6452aa86baa9ad320bd3e39 |
|
MD5 | dc50b7896cee36f735dcd4904cb3e2c2 |
|
BLAKE2b-256 | c8ca2d1164e8089600b2d2b583ea38eb858f8bf62d768ba625cd4ec779ed07fd |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c499276682ad2c291c6828f7a13b0ecb49703b563c83f0f1d89d8d1ffcfbfdef |
|
MD5 | 6f47d83e12cdddf6b35c5208a67594ab |
|
BLAKE2b-256 | 83b9636b6156c355bafdffeb26d0b560e6e7103e14bbe1ad7e089aed82237e7a |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4336dcd93292ba550503882ac1baea4363d4caafa12948700acec8875e45b4dc |
|
MD5 | 9e12cc77326952c9310dfbe5de755b4a |
|
BLAKE2b-256 | d3301b80eea0ab699c9b4046201dbd7b4c2bee6fc7395c5334f76b827ab67e96 |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6db2079ffa0fb1fa8cf6f2a9a36afdb423415cf2477e446ed2d5db5d1a0ecc3 |
|
MD5 | 0d20db668d8c94139cfdf19294c46125 |
|
BLAKE2b-256 | b4876da970ce55e5f344f37df680edf307aa4b40621bbf7053b483898a2da2af |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a6bdd94cea4d24b29074bce309f24f957a0b54ec38a6bde640fccc0b3f6d12 |
|
MD5 | e4c07e04d45df078bd0ffffff21fa696 |
|
BLAKE2b-256 | ba27d670202a19c69532332eb7441d939b744c72f07dc2afeff22e307cd8ab11 |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f652b0be0b7cdae3af24eb6f6ce56ddd3e58168b23c007a335d4f8468070088 |
|
MD5 | 188562c204f4b698c7d866d82fe3aff5 |
|
BLAKE2b-256 | 23430720dce6ad4932e857458eca29d4313eb1330c9779709abff94353c45f03 |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5cd16c1add6017dd32f4d3d54bbe2ccad243d5811848fe816005d34f6a99710 |
|
MD5 | 1690caa61d0da7a8dcf6b9c5027ce7fd |
|
BLAKE2b-256 | 2aaff2e60b894b10ac92b16ee7b0c2db486252179bbd642e4e935d6650cd2b21 |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f8791f1266f8f5448e5eb28b209f7f086cb678a9a8e173b5d90552b26a25240 |
|
MD5 | 729ab0c0992a05997f2e2abbbe13ed94 |
|
BLAKE2b-256 | 1c6e2b82da6bfe74ce0054f98948e62e57f1030a0725508163255efa9f42cc94 |
Hashes for japanese_address_parser_py-0.1.2-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a78dbd7266de54e0ce68b1c92847f7130a517b227e4633b932d38f1569953175 |
|
MD5 | 4ada59d938d3094e760e51c6b22621c8 |
|
BLAKE2b-256 | 946c080dc753117799b772eefe1e47e608d2c0ff8a006a84cdc0be160012c039 |