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.18.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b25f789067e0c9d1e288404411119f3502980ae089e3172b1883e2f764d574b |
|
MD5 | aff493f626b12f207f56d5a0175544cf |
|
BLAKE2b-256 | 42d62427f8ee252eabd8f0c1733d63896889375192c44941d9b147c609566bfe |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42d0c2af6f3d250d25c6e2ecfd4ea885474356364af982f136a4c48c4748c145 |
|
MD5 | 186070b010d0225b5c9ea21d04afd1c7 |
|
BLAKE2b-256 | 08cc05a1100044f0cc82936ad5a7d7ae0b917e3bd0e000b2e27d3c28ad804068 |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a847079dca3f6b29f6c4cc4a771a5fa344e30803146c3f08389cdf8eba56621 |
|
MD5 | 6d3b1364bb53001dbc52e9e018b52b1a |
|
BLAKE2b-256 | 6faa2befb8df804bab6c232645c4c8a439a5f348e99b176161396a544aafaf33 |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8011d3d16249fd0036cefaecb7eaed08d2b01f0835e69b81dd008f9cf810baf |
|
MD5 | 0f6f284c9a79b53bda1adde453c9ac23 |
|
BLAKE2b-256 | 8e60c6c4359b647bffc1abf3ee75cb3a706370db5edcdeb3cc5ceaeabd6e1ab7 |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd05bc01add1e5dedf09a78ac0dd77cb2c293789f2b5fe06b10f98754f8b9614 |
|
MD5 | 37bf8d248dab6f927ee86d4e7fa30185 |
|
BLAKE2b-256 | 1b59b50a4ddcbc171a0fce31eb5d0f3b0bc6a41180a97465483a21d40f4388be |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e1404c5dae05dca23737eca09f5d06b34734c3c6738777a07940bea5e09e10d |
|
MD5 | 7bf57ed06221a8e80d1662d4e1ff4624 |
|
BLAKE2b-256 | bb36b70cfd9007096367ee8ba9f715fdd97126cabbb6c3a2091e3cd7a247c19a |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e0f8bd0ddd2d024c2a125010800932c4f6e7946bd604b1017c4eecdf24071c0 |
|
MD5 | c8ecbd1ca93c646aca7b9f90a50e6f0b |
|
BLAKE2b-256 | 5e8e7248b5a6ae4426b97d0e905b7dc34cca1e2acf5dfc2751e4f5404c5c2f50 |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b125303446933e470435d9eb15f117dd3fdb0886318c7b22b55b9e0b873ab540 |
|
MD5 | 14ece4d7563e6a4a5a03dd261ba7654e |
|
BLAKE2b-256 | 56361914c6af4d945e2f28687726d7083bbae28df00c88e86f17337557033789 |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efae7b2a36b55a604a48b7b4c50a1dbc9502222bb62afa6600749211c89d1739 |
|
MD5 | e666fd803b4c99159bf1657a28eedcbe |
|
BLAKE2b-256 | 8ae09ba5164c6785efd1289555d30d657d096932935b0070fca614fc73c511b2 |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c62fca3a8d33e3dc9fc9e91842cd2c02533b9c7fc548ca487edfa693d2b37760 |
|
MD5 | f49e9d575f54a81e1bff72760ff99d1e |
|
BLAKE2b-256 | 4b761774749e6cee6190fee695aff93bdde1835abeeef5016c7f6fb5424fc653 |
Hashes for japanese_address_parser_py-0.1.18-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8a84075fae839a91d2d53dd10d0616f1235d9e85466045c4750263bfb586ffa |
|
MD5 | e3194904c50513f059633aeaa2a500d0 |
|
BLAKE2b-256 | 8564ac647f54d09d6f3be15fa2f59e0515233c96ad55003d7cecc9866caa3898 |