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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61ebc6e1eba0f2241bf52265896f39a8cfa5cc9ebdf4be0fd9c2394c05cd2c7e |
|
MD5 | 3e68d3e3472796d73475800636a2f4dc |
|
BLAKE2b-256 | 61ab78abf91957c0a89dd8a777186f736f2c2fafdea888af3ab9d2055ff07c03 |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 580740bdf4159cfefc5cf32385b2361f910416257c57de404d5c06e7298ca3c6 |
|
MD5 | c1e8c0eaa8c450aa4fa6fc29b265f05f |
|
BLAKE2b-256 | 1acbdc77b484ea112369cba452b7294f68f859815326625fd8cfabdecadfa66d |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39b3ab0ddf3c6cc472fb8647540db2b638e10d2bbafa2493e3e9e4f4a189a1ed |
|
MD5 | ce42311a2bb874e9c2613eec4addde15 |
|
BLAKE2b-256 | d4e60589da8196ce465788978e7b1f270c12bdd48c2f6eba3c365f533edb8dce |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6198373431515d40906f7faa5178a0dc42aa0d6d2524a5526c7141cbb0ec5c3f |
|
MD5 | beb3ce1a528498c108b39bd769a8b1fc |
|
BLAKE2b-256 | d10c25aef0fbfb9040898d7157256003951871ea7fa8241efa232a42a84194df |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 682b9a381e14faeaffece583c901f28a4f619d23b07f58a56d426bfdc69cce94 |
|
MD5 | 7e4a1b7cb26afe3b052c52f979a667b4 |
|
BLAKE2b-256 | 7a784b508a9d615100eec17f73ee65f24f3b01daef906c1e725c70cc5992a8a8 |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36064e51d3f73e1cc2ac61b254067a6d63bfa78636b6eb61826c57556d1d1927 |
|
MD5 | 94d4565804f1e25faa59051059d5d927 |
|
BLAKE2b-256 | 5bbfd02fa9ce854a290aa81aa4cd0ed00c4f4068f4ca8f2c5e6c64ffdb2721df |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3dd1652b32578df43b2ebce855fd11330a1868fd8def0018703ed9658bfa979 |
|
MD5 | a0f68f948faef1f90f609f23af775419 |
|
BLAKE2b-256 | 2f6b9d19ef1a1f0e4fb7e18fea956908b15fdbba456f1df67a53b16869f44d7c |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ddc5fc9a4cdfe6ef73e155b4648d456f4078cf438c7b815d4e903a93397d505 |
|
MD5 | 7480a48447866c582ee432debb07aec9 |
|
BLAKE2b-256 | 709ba5473e1f243d4fbfd6d2b5920d0b667ef78607c1c19872b87fc5c6e69e2d |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd0d925a36b2ee38a328c68aae8305ff9563eb640133c8ea716eccc5467a8e7a |
|
MD5 | fe830328d24999686a372738b7f95077 |
|
BLAKE2b-256 | f1b6913a7c0ce319bdfa56f7809a9108ee98f359aec9ff81545f6b719dbf2094 |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62a3cb88fb27e017bd5175c5758809a7b63c85c1e4003d21684d8641e3f0819e |
|
MD5 | d41ec57b75c79ee171032f8bcb9f70e4 |
|
BLAKE2b-256 | ef987188076a3456d5d62fd521ead7f99a881bdd00d8a88e3b603a2430ce47c0 |
Hashes for japanese_address_parser_py-0.1.1-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdd2349835f1974e2a4890898e785226e70495189daea8a5766d48e936c41924 |
|
MD5 | e6d3fe386f95c74e854a2a400cd6b4c8 |
|
BLAKE2b-256 | d64cd04168a162dd551f714e760919d648896566763903ca1a4de49bae99caa0 |