#parser

japanese-address-parser

A library for processing addresses of Japan

57 releases

new 0.2.0-rc.2 Nov 18, 2024
0.1.24 Nov 10, 2024
0.1.5 Jul 13, 2024
0.1.0-beta.11 Mar 31, 2024
0.1.0-alpha.2 Nov 30, 2023

#35 in Geospatial

Download history 10/week @ 2024-07-31 212/week @ 2024-08-07 338/week @ 2024-08-14 167/week @ 2024-08-21 227/week @ 2024-08-28 133/week @ 2024-09-04 367/week @ 2024-09-11 111/week @ 2024-09-18 296/week @ 2024-09-25 161/week @ 2024-10-02 22/week @ 2024-10-09 137/week @ 2024-10-16 174/week @ 2024-10-23 337/week @ 2024-10-30 200/week @ 2024-11-06 296/week @ 2024-11-13

1,011 downloads per month

MIT license

160KB
4K SLoC

japanese-address-parser

Docs Crates.io (latest) Rust Version Unit test & Integration test

A Rust library for parsing Japanese addresses.

Usage

Add the following to your Cargo.toml.

[dependencies]
japanese-address-parser = "0.1"

Async Version

use japanese_address_parser::parser::Parser;

#[tokio::main]
async fn main() {
    let parser: Parser = Default::default();
    let parse_result = parser.parse("東京都千代田区丸の内1-1-1").await;
    println!("{:?}", parse_result);
}

Blocking Version

use japanese_address_parser::parser::Parser;

fn main() {
    let parser: Parser = Default::default();
    let parse_result = parser.parse_blocking("東京都千代田区丸の内1-1-1"); // `parse_blocking()` is available on `blocking` feature only
    println!("{:?}", parse_result);
}

Wasm support

npmjs

This crate is designed to be buildable for wasm32-unknown-unknown with wasm-pack. Pre-compiled wasm module is available on npmjs.com

You can run this crate on your browser. For more details, see wasm module's README.

Python support(experimental)

PyPI - Version

This library can be called from the Python world. For more details, see python module's README.

Road to v1

The goals of this library are as follows.

  • Supports not only wasm but also multiple platforms and architectures.
  • Enables more advanced normalization. For example, provides more detailed analysis than town level.
  • Returns the location of the given address.
  • Enables processing of town names that no longer exist due to municipal mergers.

Support

This software is maintained by YuukiToriyama. If you have any questions, please create a new issue.

Acknowledgements

This software was inspired by @geolonia/normalize-japanese-addresses.
In addition, the parsing process uses Geolonia 住所データ which is provided by 株式会社Geolonia.

License

This crate is distributed under the terms of the MIT license.

Dependencies

~9–22MB
~292K SLoC