japanese-address-parser-py


Namejapanese-address-parser-py JSON
Version 0.1.0b17 PyPI version JSON
download
home_pageNone
SummaryA Rust Library to parse japanese addresses.
upload_time2024-04-28 17:45:36
maintainerNone
docs_urlNone
authorYuuki Toriyama <github@toriyama.dev>
requires_pythonNone
licenseMIT
keywords converter utility geo rust
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # japanese-address-parser-py
A python toolkit for processing japanese addresses

[![PyPI - Version](https://img.shields.io/pypi/v/japanese-address-parser-py)](https://pypi.org/project/japanese-address-parser-py/)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/japanese-address-parser-py)](https://pypi.org/project/japanese-address-parser-py/#history)
[![Unit test & Code check](https://github.com/YuukiToriyama/japanese-address-parser/actions/workflows/code-check.yaml/badge.svg)](https://github.com/YuukiToriyama/japanese-address-parser/actions/workflows/code-check.yaml)

## 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
```bash
pip install japanese-address-parser-py
```

## Usage

```python
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)
```

```text
{'prefecture': '埼玉県', 'town': '高砂三丁目', 'rest': '15-1', 'city': 'さいたま市浦和区'}
{'rest': '1-1', 'town': '市場町', 'prefecture': '千葉県', 'city': '千葉市中央区'}
{'prefecture': '東京都', 'rest': '8-1', 'town': '西新宿二丁目', 'city': '新宿区'}
{'town': '日本大通', 'city': '横浜市中区', 'prefecture': '神奈川県', 'rest': '1'}
```


```python
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"])
```

```text
神奈川県
横浜市中区
本町六丁目
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.

```bash
# 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](https://github.com/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](https://github.com/geolonia/normalize-japanese-addresses).  
Also, the parsing process uses [Geolonia 住所データ](https://github.com/geolonia/japanese-addresses) provided
by [株式会社Geolonia](https://www.geolonia.com/company/).

## License

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


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "japanese-address-parser-py",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "converter, utility, geo, rust",
    "author": "Yuuki Toriyama <github@toriyama.dev>",
    "author_email": "Yuuki Toriyama <github@toriyama.dev>",
    "download_url": "https://files.pythonhosted.org/packages/3e/2b/df18ce67803c0ce9f5102d5a16ec88bcca68818aceaf3b068afc2235303f/japanese_address_parser_py-0.1.0b17.tar.gz",
    "platform": null,
    "description": "# japanese-address-parser-py\nA python toolkit for processing japanese addresses\n\n[![PyPI - Version](https://img.shields.io/pypi/v/japanese-address-parser-py)](https://pypi.org/project/japanese-address-parser-py/)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/japanese-address-parser-py)](https://pypi.org/project/japanese-address-parser-py/#history)\n[![Unit test & Code check](https://github.com/YuukiToriyama/japanese-address-parser/actions/workflows/code-check.yaml/badge.svg)](https://github.com/YuukiToriyama/japanese-address-parser/actions/workflows/code-check.yaml)\n\n## What is it?\n**japanese-address-parser-py** is a Python package for parsing japanese addresses.\nAny address can be processed into structured data.\n\n## Installation from PyPI\n```bash\npip install japanese-address-parser-py\n```\n\n## Usage\n\n```python\nfrom japanese_address_parser_py import Parser\n\naddress_list = [\n    \"\u57fc\u7389\u770c\u3055\u3044\u305f\u307e\u5e02\u6d66\u548c\u533a\u9ad8\u78023-15-1\",\n    \"\u5343\u8449\u770c\u5343\u8449\u5e02\u4e2d\u592e\u533a\u5e02\u5834\u753a1-1\",\n    \"\u6771\u4eac\u90fd\u65b0\u5bbf\u533a\u897f\u65b0\u5bbf2-8-1\",\n    \"\u795e\u5948\u5ddd\u770c\u6a2a\u6d5c\u5e02\u4e2d\u533a\u65e5\u672c\u5927\u901a1\"\n]\nparser = Parser()\nfor address in address_list:\n    parse_result = parser.parse(address)\n    print(parse_result.address)\n```\n\n```text\n{'prefecture': '\u57fc\u7389\u770c', 'town': '\u9ad8\u7802\u4e09\u4e01\u76ee', 'rest': '15-1', 'city': '\u3055\u3044\u305f\u307e\u5e02\u6d66\u548c\u533a'}\n{'rest': '1-1', 'town': '\u5e02\u5834\u753a', 'prefecture': '\u5343\u8449\u770c', 'city': '\u5343\u8449\u5e02\u4e2d\u592e\u533a'}\n{'prefecture': '\u6771\u4eac\u90fd', 'rest': '8-1', 'town': '\u897f\u65b0\u5bbf\u4e8c\u4e01\u76ee', 'city': '\u65b0\u5bbf\u533a'}\n{'town': '\u65e5\u672c\u5927\u901a', 'city': '\u6a2a\u6d5c\u5e02\u4e2d\u533a', 'prefecture': '\u795e\u5948\u5ddd\u770c', 'rest': '1'}\n```\n\n\n```python\nfrom japanese_address_parser_py import Parser\n\nparser = Parser()\naddress = \"\u795e\u5948\u5ddd\u770c\u6a2a\u6d5c\u5e02\u4e2d\u533a\u672c\u753a6\u4e01\u76ee50-10\"\nparse_result = parser.parse(address)\nprint(parse_result.address[\"prefecture\"])\nprint(parse_result.address[\"city\"])\nprint(parse_result.address[\"town\"])\nprint(parse_result.address[\"rest\"])\n```\n\n```text\n\u795e\u5948\u5ddd\u770c\n\u6a2a\u6d5c\u5e02\u4e2d\u533a\n\u672c\u753a\u516d\u4e01\u76ee\n50-10\n```\n\n## Development\nThis library is written in Rust language. You need to set up a Rust development environment to build this library.\nAlso, you need to install `maturin` because this library uses it in order to generate Python bindings.\n\n```bash\n# Install maturin\ncargo install --locked maturin\n# Clone repository\ngit clone https://github.com/YuukiToriyama/japanese-address-parser.git\n# Build python module\ncd japanse-address-parser/python\nmaturin build --release --out dist --find-interpreter\n# Install the built library\npython3 -m venv .venv\npip3 install dist/japanese_address_parser_py-[version]-cp37-abi3-[arch].whl\n```\n\n## Support\n\nThis software is maintained by [YuukiToriyama](https://github.com/yuukitoriyama).\nIf you have questions, please create an issue.\n\n## Where to get source code\nThe source code is hosted on GitHub at:\nhttps://github.com/YuukiToriyama/japanese-address-parser\n\n## Acknowledgements\n\nThis software was developed inspired\nby [@geolonia/normalize-japanese-addresses](https://github.com/geolonia/normalize-japanese-addresses).  \nAlso, the parsing process uses [Geolonia \u4f4f\u6240\u30c7\u30fc\u30bf](https://github.com/geolonia/japanese-addresses) provided\nby [\u682a\u5f0f\u4f1a\u793eGeolonia](https://www.geolonia.com/company/).\n\n## License\n\nThis crate is distributed under the terms of the MIT license.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Rust Library to parse japanese addresses.",
    "version": "0.1.0b17",
    "project_urls": {
        "Source Code": "https://github.com/YuukiToriyama/japanese-address-parser"
    },
    "split_keywords": [
        "converter",
        " utility",
        " geo",
        " rust"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3fc8b8ee16863fd319e3b27d6b60d24c2cef2348d51dab8f0b8d886cab39f498",
                "md5": "bbff04c125ed380af1ff10e22c92d224",
                "sha256": "46066c744dce048ce607e93c0d17e0ad769295479c188b9da446388369c401f3"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "bbff04c125ed380af1ff10e22c92d224",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 2372160,
            "upload_time": "2024-04-28T17:45:34",
            "upload_time_iso_8601": "2024-04-28T17:45:34.613582Z",
            "url": "https://files.pythonhosted.org/packages/3f/c8/b8ee16863fd319e3b27d6b60d24c2cef2348d51dab8f0b8d886cab39f498/japanese_address_parser_py-0.1.0b17-cp37-abi3-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "65288ad90684ffcc4d4711043de286276186aaa81f211a6e538aae3e1f771dca",
                "md5": "85ffeeb8288643bf278573fa16f2da38",
                "sha256": "4cc101fd7f783424d79af62320940901bea36d932f4c8adc296d4f83cdee6f61"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "85ffeeb8288643bf278573fa16f2da38",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 2270703,
            "upload_time": "2024-04-28T17:45:33",
            "upload_time_iso_8601": "2024-04-28T17:45:33.290735Z",
            "url": "https://files.pythonhosted.org/packages/65/28/8ad90684ffcc4d4711043de286276186aaa81f211a6e538aae3e1f771dca/japanese_address_parser_py-0.1.0b17-cp37-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "455a9395a8d1b921e085e1520abca086f531744fcd4453cd6bd660be1c95e611",
                "md5": "2f5fa5849d3f566cec8a0a3743876146",
                "sha256": "f9feba59c67341ba6bbde80230052f14a9e8c870ae183c9842d52963de2bc949"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "2f5fa5849d3f566cec8a0a3743876146",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 3604550,
            "upload_time": "2024-04-28T17:45:21",
            "upload_time_iso_8601": "2024-04-28T17:45:21.558322Z",
            "url": "https://files.pythonhosted.org/packages/45/5a/9395a8d1b921e085e1520abca086f531744fcd4453cd6bd660be1c95e611/japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "013993f21b83db759914b171db93a426a8f0dd63ca4a098091bbd63e3ef7af09",
                "md5": "08b9ef0e4978b2262f64ea30b160ebda",
                "sha256": "43c5dd00214a82dda3f10b31e10c9f187156585c8d22cfe511591e5599c42b87"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "08b9ef0e4978b2262f64ea30b160ebda",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 3619741,
            "upload_time": "2024-04-28T17:45:23",
            "upload_time_iso_8601": "2024-04-28T17:45:23.846698Z",
            "url": "https://files.pythonhosted.org/packages/01/39/93f21b83db759914b171db93a426a8f0dd63ca4a098091bbd63e3ef7af09/japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "066a6a159097db92549b6ba2830c863c2ee5fec10e148082d3800a638b7daefe",
                "md5": "7a32961547fa866822b7302a5c5b974a",
                "sha256": "0108a4ae93f602f802b9aa0085c1faad2079c9a81b2c103e8b779c204afd5f5b"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "7a32961547fa866822b7302a5c5b974a",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 3632589,
            "upload_time": "2024-04-28T17:45:29",
            "upload_time_iso_8601": "2024-04-28T17:45:29.266837Z",
            "url": "https://files.pythonhosted.org/packages/06/6a/6a159097db92549b6ba2830c863c2ee5fec10e148082d3800a638b7daefe/japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1abf7fa9c40ce79fa70b0673f0c4549395b7acba4a46eb12d8293a211a78dc05",
                "md5": "2b745e335004bf59de157ffb32d5fe2c",
                "sha256": "896ddc9f2d34f7cd19a969890765275dff942a760f8ade130282b988274d702c"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "2b745e335004bf59de157ffb32d5fe2c",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 3802960,
            "upload_time": "2024-04-28T17:45:25",
            "upload_time_iso_8601": "2024-04-28T17:45:25.834775Z",
            "url": "https://files.pythonhosted.org/packages/1a/bf/7fa9c40ce79fa70b0673f0c4549395b7acba4a46eb12d8293a211a78dc05/japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "794d9c3ab11d15fee0dbd78f7f86f4526b2591b1b43879aa91d8b5f8380a0ffe",
                "md5": "825c3622a75256a8d28bbe08c821f78d",
                "sha256": "743169171c3fc4aae9b6a7ecd45327c1218ce45c4defdc15e2ad80b9e7569dbb"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "825c3622a75256a8d28bbe08c821f78d",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 4117441,
            "upload_time": "2024-04-28T17:45:27",
            "upload_time_iso_8601": "2024-04-28T17:45:27.824859Z",
            "url": "https://files.pythonhosted.org/packages/79/4d/9c3ab11d15fee0dbd78f7f86f4526b2591b1b43879aa91d8b5f8380a0ffe/japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c4a79abcb8a9d8286852111d143191e974896a242574f2d2f990dcefcd5908d0",
                "md5": "34b3d4d58b4c678cf1ae2924c45277a4",
                "sha256": "8f6c67cc64b51cd3b8fe5aa0115049ad0c5d6e645f252a06ca520cfc414015de"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "34b3d4d58b4c678cf1ae2924c45277a4",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 3671451,
            "upload_time": "2024-04-28T17:45:31",
            "upload_time_iso_8601": "2024-04-28T17:45:31.335241Z",
            "url": "https://files.pythonhosted.org/packages/c4/a7/9abcb8a9d8286852111d143191e974896a242574f2d2f990dcefcd5908d0/japanese_address_parser_py-0.1.0b17-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3f5ed53e3c361317d491de0889a9e4b709d65aaa8953a8f579bd13dd667a6883",
                "md5": "25ff934a3084e19ad5fccc27ac27ffdd",
                "sha256": "a8fad2e730bbc9fc05ce5a0d21912ba9285a932a56cbabbd589d4ce4f905b98e"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-win32.whl",
            "has_sig": false,
            "md5_digest": "25ff934a3084e19ad5fccc27ac27ffdd",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1762014,
            "upload_time": "2024-04-28T17:45:39",
            "upload_time_iso_8601": "2024-04-28T17:45:39.563680Z",
            "url": "https://files.pythonhosted.org/packages/3f/5e/d53e3c361317d491de0889a9e4b709d65aaa8953a8f579bd13dd667a6883/japanese_address_parser_py-0.1.0b17-cp37-abi3-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7965ea1b7fb041dd66b56b9f5bddfe39f894a7b18cb7951d74f06ab00e43dfd9",
                "md5": "4c908dc529ff4ee8031d1f3453923075",
                "sha256": "9273458d7a6128e2ac71c83a957219b6c65f3b7974bd4012eb7d6fd08e80e803"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17-cp37-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "4c908dc529ff4ee8031d1f3453923075",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 2103794,
            "upload_time": "2024-04-28T17:45:37",
            "upload_time_iso_8601": "2024-04-28T17:45:37.940365Z",
            "url": "https://files.pythonhosted.org/packages/79/65/ea1b7fb041dd66b56b9f5bddfe39f894a7b18cb7951d74f06ab00e43dfd9/japanese_address_parser_py-0.1.0b17-cp37-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "3e2bdf18ce67803c0ce9f5102d5a16ec88bcca68818aceaf3b068afc2235303f",
                "md5": "352491591fa909324527589d41340696",
                "sha256": "fe925df22821f51c2bf55d5e9a71ff4d011d1ae42b5ed3af39e1ce54334ee9f3"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.0b17.tar.gz",
            "has_sig": false,
            "md5_digest": "352491591fa909324527589d41340696",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 29497,
            "upload_time": "2024-04-28T17:45:36",
            "upload_time_iso_8601": "2024-04-28T17:45:36.562127Z",
            "url": "https://files.pythonhosted.org/packages/3e/2b/df18ce67803c0ce9f5102d5a16ec88bcca68818aceaf3b068afc2235303f/japanese_address_parser_py-0.1.0b17.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-28 17:45:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "YuukiToriyama",
    "github_project": "japanese-address-parser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "japanese-address-parser-py"
}
        
Elapsed time: 0.24781s