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.17.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0e39989c53efa44dc0dfaa82ed0acaa0313d4aec4031b644f59a19b96bff8d6 |
|
MD5 | 4676ed1e90fc30aec81bb6fa6cfb30fb |
|
BLAKE2b-256 | 7f789f2382a19aaf0498b68b6ae418c4289102094f77a92e912557d8592cfb72 |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3cf64d1ecfb39641e1017eb371b97c3ea9446c526ce2ee6cb6f037842d11d41 |
|
MD5 | aa70621f07bf292a6ecefeb80e948953 |
|
BLAKE2b-256 | daad2182ff784d2ec9e13fb7f566047eeb7726770f4e2371c85c646f5ba890ed |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b6375faa242e1f738da48701164d8d1be61fcc5600e9070106c933c7a6a30d5 |
|
MD5 | e6fb3fd891a01a68f9195a1359d687ce |
|
BLAKE2b-256 | 84190569eb77c4c639a09b635938b726495ce61033f065f0936f28ff9283ae00 |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d7605629fb497d72241c53daa9550969139013307d00cecc9abd44980874565 |
|
MD5 | edb0f2e0885dce4b6589bb96cb65f256 |
|
BLAKE2b-256 | 09e46dd35a7b24c9479cdcc15cfe3ffb7f53df7805aa8c890a4dbaa2b114e8cb |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31132bb1cf29560bc1f72e65b0ce57f4e94c298375cc65a5510fab7ede56682d |
|
MD5 | 2242c9277edebc559d8c8f9c81bb200f |
|
BLAKE2b-256 | 6bb4b3a0378f346bdcacab06e6dad93a028fb10872197b268a4263fd70545cba |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1ca1a960d35b4802568ac57ca724b836dcc0fc24619408178a89867607525ca4 |
|
MD5 | a8781c5a7b6a9696173c634ac7135d7d |
|
BLAKE2b-256 | 42b76deda2a163613606a5f9da015ed38d9983f687e634186abda22e6c6c3302 |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67463e2fea2f50bd80185fe1e5d1019c832cb7f3bdb21e078a9a81bbcd5294e5 |
|
MD5 | 379b57d8f41eb091691cf941e11e7036 |
|
BLAKE2b-256 | 9c01b17fb21c2e07fc7fae775543d63a82e8066e44b2d7ca57dce2c1f59810a1 |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42f32ef4ac66f45b949499bb24f34cd3ee1d1cc998ad8e8cd34d50a78bb279ca |
|
MD5 | 8af45a4e822ad41f22f61a0ea54afc37 |
|
BLAKE2b-256 | ab09d55ba14946dc042201589e0a264bdda7df966fe894fe67f7be4bb74c62e5 |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02e4159bda643e15752f613a867d7b65a319e01eb3acafc72330ed8d99d7918a |
|
MD5 | a8055aa6069714be61a551d86b192dd5 |
|
BLAKE2b-256 | ab914789581d9845e61078fbd3e93d32ad1b4c6cb48b1b9ef51575243df1de49 |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8ca5fac369edda419f96ffc265e4454a88f6c082c758b76805c56e755f8028e |
|
MD5 | a6adb1dccdcee49f50589efdb4181edb |
|
BLAKE2b-256 | 6815ff269af814b1a8fa9e4bf30c8bc1da12136e1824afef0a492b5adae1d6eb |
Hashes for japanese_address_parser_py-0.1.17-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae5b44ada7b33ead50ca4446b47688c699911c24215af4a81ed14666d1311852 |
|
MD5 | 20c31f0cba62d41a20388d8bc7efc70d |
|
BLAKE2b-256 | 570c6584a7e60c8e363f32deba79d249b2b20c10f387fe2e172c736ddb9e6a2c |