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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f67dbbac002d84067f5bb14bced6107c7aca1a8e7cea50913c2fe74c81acff63 |
|
MD5 | 1072243d7661f9d33d03bacb3ee010e5 |
|
BLAKE2b-256 | 363cd804a78c543764c67e086f6ac16b2cc85c5d86e9cb9b5fcc8d538549e2e7 |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87200029c7da9dacab1eafa9efa0136dfde0ae03c8f4727eeb402ddde5ba2efc |
|
MD5 | de1174d11a571132fa9378ccc4650a50 |
|
BLAKE2b-256 | 51af88df87fb8e31f90a646f29b50197c5392cc30ee03fb374d06f79cd854247 |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8be91e5e56fba19773509944ee089e28dbf4aa83559985ebd05d9e77c3632a7 |
|
MD5 | 9556894dabede479bf06e9b517305255 |
|
BLAKE2b-256 | 675c78445d459f8b9743c90bbc80cf3c7562fbf960f52fa926c196aa6a1e19ff |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b71aa7a2ed8fded381ac8178f85a899f23fe90469b779f9b664e896e3f86a6ab |
|
MD5 | 94db09ae46392fe7693e4c142b601936 |
|
BLAKE2b-256 | 1f737d37caca00d40021ea55c1cb733246f7d7129dd9ca1d0a854b8b20833c4b |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 722f50fc7641bc2a18dd7cc1c583e57afcc5908a5b2759e532cb031bcdef7c06 |
|
MD5 | d554b8694bcfe9de6da2aa47cc24a274 |
|
BLAKE2b-256 | d4a94c268808fd8eb8f892a85c36e53bbd60cdadc12f0cc8a5e9f49143861faf |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0654039ce2ae4e29a3f8167ecaabb188c787495d609b9395f118fd20ccbcc31f |
|
MD5 | 1cc3499bccb2379551a7408a760560f9 |
|
BLAKE2b-256 | 1a9f8c5409685f18b25a47fd6cc62efa7795a3420a061c6621accdefa87fdb2f |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8267ca4cf3e1888c4ffeef6ad4e2c2a0cc3c6de2952694c4f8198cc10611f46f |
|
MD5 | 66aca3c923a7b9f6ae197f8bfdb8b2ce |
|
BLAKE2b-256 | f82f96e8e4db20948d91c26f32296bd9ad74725fa46135d0ffc28b594d94c6ff |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2e58e1f1abf9a5162d3c34b9715cc70bd09a70455be4030e5a9e98206beb4b3 |
|
MD5 | d5d9d2f4516e9b4c01d0020480c2e89b |
|
BLAKE2b-256 | 46ec2cc35822b9d6f4faa52af25376943219e8df69b91999e139ab7095a8d074 |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c44befda32286f6a707d9555b1d631f69f21503bae687aa79dd7d92cc7517f08 |
|
MD5 | d92f408976122671fb660a177677e215 |
|
BLAKE2b-256 | 8aeddcbf096ab3c4f19d08fc3341ccb96676cca17d6f0a34d171543a98ec0f8b |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11ad780d66494ee28230ab4dfbab5462053afa8d051f41cf7a6c793cf8192dfe |
|
MD5 | 2ed70d86b7e8ab945629db431e9f935d |
|
BLAKE2b-256 | f1808dd36aa41c98e3d7f93d31994b91ca4ff53c0049c010c78e756ce268dcde |
Hashes for japanese_address_parser_py-0.1.7-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fdf79a978497471c5abe8e1995be7420c135570706fe559cf602690c354d9a4 |
|
MD5 | ef67d97743114d83736580d912915f36 |
|
BLAKE2b-256 | 510f6b405ce7dc52249c05d8325d394d1de9acc7acac6d1b0e8fb50958556b9b |