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.9.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 217773bf6c1ce9210cd30d990bd86ad587a96909384a832bd9c6588571d3fefc |
|
MD5 | 73e6a7674c23d305c78516c5b2a7c10d |
|
BLAKE2b-256 | 710cd7613d4d89ac504d0b0d88f8343bdd65f7467078847d296c176a99eb2b70 |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59babd148d1523e98ffed640ab5e1d14ecd4d11b852d79c9a4f98873b3eb4ab1 |
|
MD5 | 7d16064206a1d0028784f17b6cee6e95 |
|
BLAKE2b-256 | 10c45d4961675e4c309efc46eecc501a700d201253421690fab15f118ded221d |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee21090ce98e586205bbcc10a79c6579ba19d749c321ddacd5b95086c57301bc |
|
MD5 | a3324579a775571cbd2f1dbcf7afdb24 |
|
BLAKE2b-256 | b762dfdfca38cae5f2afc2efdcb2e7abd50168ccc8c9658e64e8c1e82b0ac80d |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfbc2d90cdb8a020057daa8fcb74f12d84f792f4f4b665f25470a5dea2f470ea |
|
MD5 | bfb32c768288589d19f63f51e3dc70cb |
|
BLAKE2b-256 | bf6c18fb30ae9265e99336ab8da5d6feca2acd74e61d0af02afed7516435d491 |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4bdb12912f72f0eed5a653d9300c1b3b3de4f10be9a6e54e81035f7d6576051 |
|
MD5 | b3479a045ff525cefe3e026020cbac29 |
|
BLAKE2b-256 | 71fb805c4df7699f511bf27b6b65338ecf8ebf6ca8dd1d085578e2a222379a62 |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8cfc167ee412b2f61efdd0f5fad8b3170d68f15135b3db9313149c048e66969 |
|
MD5 | 503c3600c85bdaf560ba7cc26018e63e |
|
BLAKE2b-256 | 13785747e22db7df77bf514d3cc645b930990fc028c1c7a333eee185cf0497be |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d13aa64eabe530d55d46da409811f0efd8fabff6ea8eeaa3b749a4f512ae084 |
|
MD5 | fab95b014b31d676884f66cf4d92f82b |
|
BLAKE2b-256 | 07fc43226159b22c89ce996d749e1cc42d776d032b2e5bcbc37baa3d0cc4bd25 |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3c228da23a50052f8986ab8088b3bcbfa89d56d176f61e782dffa1ba58940940 |
|
MD5 | 2c035e3a9c1757c126be5a738fe65db2 |
|
BLAKE2b-256 | 83018630cc65d060133586dce9a742f58ab7a95c6c8d0b0ebaa5b68f0a3626e3 |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80f67ffafac9e3090f448006838b8865d51278e8ee806934fc73ec32d7d1f9e4 |
|
MD5 | 84adc2d24b8b46cb8096449f9a690e24 |
|
BLAKE2b-256 | ad6f924bd684caad997ea286cfb697081772f9c8917aee223e2e0c3b42101968 |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68c5cb4f4f3193de32ea8876c162a184d9ef291cbecc3ff7297e64816fd69ad3 |
|
MD5 | 53106fd45b5290ac1fae593bab70c96c |
|
BLAKE2b-256 | caa5166ad5e6b637dd8c1ffe3ea945d6bfe2978fc10c80814d5a775f797e01c3 |
Hashes for japanese_address_parser_py-0.1.9-cp37-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 846b3a343d6e3f66b48d8516634ce7f12b8456b854de4e6a1db4e57259aa4931 |
|
MD5 | 9fb2c96d1d2d79eb14d1a99c65f7b271 |
|
BLAKE2b-256 | 2dea4caac8cf39b5ff02d0c1cb0d6f57d7640693af5898d0b5bb0683bbe1a900 |