A Rust Library to parse japanses 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
import japanese_address_parser_py
address_list = [
"埼玉県さいたま市浦和区高砂3-15-1",
"千葉県千葉市中央区市場町1-1",
"東京都新宿区西新宿2-8-1",
"神奈川県横浜市中区日本大通1"
]
for address in address_list:
parse_result = japanese_address_parser_py.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'}
import japanese_address_parser_py
address = "神奈川県横浜市中区本町6丁目50-10"
parse_result = japanese_address_parser_py.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.0b12.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 011e3638c7d8636f3e29b864085cd534195a6e432c6672fe4bd47016e9a0afc6 |
|
MD5 | 384f13325a5965af387ffb40c8e7535a |
|
BLAKE2b-256 | 3d0e88ae3076d6b7531a215fe84122bafb41ef22792e5793d6cca0f8946e63df |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24e7d343047bd145a2b9222f7b9c6089c058d5ceced8c015c9c713e84fa94aa6 |
|
MD5 | 9601db1fb695bbe3978d1d37a9d6cf66 |
|
BLAKE2b-256 | 84789519407a7c50fa25c4a570a12d71a3cb1c3bc59c455e6f305e2cd22ebf70 |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 841228caa3cb1ccaa6c5fc83e8481d44fd37a8842ae15963738d1b1ba016cd2c |
|
MD5 | 99e64eb12662060730ddd8122fcf2701 |
|
BLAKE2b-256 | e3b1a045875f63bb56b5fcd099c700303d3cdf5a28c6134de4abe9aceeee020e |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 296bbfdf1978b2cbe37df829b70ac8d0f0c45fc2f3ba44be5a2a0be0ec717d7e |
|
MD5 | cbcbd86f0e8df338cf18b6c5ff189589 |
|
BLAKE2b-256 | 8a2e74510bb6333c2b356c5ae52cbf0f035c19155e644bc20fd7d4cd58aa8de0 |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d888b76d1866a5a2dc19004bf97919ea7523c8cfc72f6fa1e7a3431f2d75dd5c |
|
MD5 | 3c207353ebed2a4300ab003752dd466e |
|
BLAKE2b-256 | 6726c98bd81eb272f6d8f54877a17d3eb3046ed25c39aea3215a4c71119cd602 |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f0467705fad33596cd54d55b5c542c0c2de30aee0dcf55ff6f2b5106975b140 |
|
MD5 | f6a73959ac8924ad56691cf0f82b666f |
|
BLAKE2b-256 | a67aa000f7a029f65e7e368d41c9eeff662c10e7f2cc7b6d054785b37e419a59 |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1f86101eec8e9652b73c7f629c0e37045bb8795106fd2063bc4610c64dfd06f |
|
MD5 | 15cb4496f244eb0d2646aa640d0dbd1a |
|
BLAKE2b-256 | adc6732239b65f6e5a18bc854bf3f179d7dd43023b39e729c9ef3e4b49fc5236 |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 99e24882c1c76cf97c1c5298960df643ec693a3c5fe0f5a9b0126319f6d8e2c8 |
|
MD5 | 114d13679197948824b38a330a44a31d |
|
BLAKE2b-256 | 1fdfd90680c1b0266300191ce7fa5a8b3dbe016916aadd657ded127152b96899 |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 096ea3ac3e246aa91bad9db3039344540c3710da41e3120432de3575440b27fa |
|
MD5 | d1282358bae6ae952bf4bbf56cce7b77 |
|
BLAKE2b-256 | c349f0063ffd243ce0fce263cbd6b0b3d2ce48ceee29d1c11ca07f7036fe994b |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01c1cd6a4af8fd4739cfd59bd2e40dd3280913b778bf2e9fcc2c8559644503dd |
|
MD5 | 3ea1f48852fd05d0ca2acd7e6b7d87ca |
|
BLAKE2b-256 | 91d2df75d0361a6fcf12637cb3de1867074e805b9babffe8318b354aa57ad876 |
Hashes for japanese_address_parser_py-0.1.0b12-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d064ab7d0e9f565515925abd6458b990cecb07c5375b5239ba35c0fdcfb79a4c |
|
MD5 | f6f027656a67d12228ad93730fa08475 |
|
BLAKE2b-256 | 1e0ef844a454278da2517f8865e273b5fb7b329153372d4e35a86c18cc1d7ae8 |