japanese-address-parser-py


Namejapanese-address-parser-py JSON
Version 0.1.24 PyPI version JSON
download
home_pageNone
SummaryA Rust Library to parse japanese addresses.
upload_time2024-11-10 10:20:33
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 & Integration test](https://github.com/YuukiToriyama/japanese-address-parser/actions/workflows/run-test.yaml/badge.svg?branch=main)](https://github.com/YuukiToriyama/japanese-address-parser/actions/workflows/run-test.yaml)

## What is it?

**japanese-address-parser-py** is a Python package for parsing Japanese addresses.
Any address can be parsed 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. You need to set up a Rust development environment to build this library.
Also, you need to install `maturin` as 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 any questions, please create a new 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 inspired
by [@geolonia/normalize-japanese-addresses](https://github.com/geolonia/normalize-japanese-addresses).  
In addition, the parsing process uses [Geolonia 住所データ](https://github.com/geolonia/japanese-addresses) which is
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/01/07/f5021b3b53ca70fd9c72f78c7b5a05fbf6c67cdde09b207383faa962e90b/japanese_address_parser_py-0.1.24.tar.gz",
    "platform": null,
    "description": "# japanese-address-parser-py\n\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 & Integration test](https://github.com/YuukiToriyama/japanese-address-parser/actions/workflows/run-test.yaml/badge.svg?branch=main)](https://github.com/YuukiToriyama/japanese-address-parser/actions/workflows/run-test.yaml)\n\n## What is it?\n\n**japanese-address-parser-py** is a Python package for parsing Japanese addresses.\nAny address can be parsed into structured data.\n\n## Installation from PyPI\n\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```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\n\nThis library is written in Rust. You need to set up a Rust development environment to build this library.\nAlso, you need to install `maturin` as 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 any questions, please create a new issue.\n\n## Where to get source code\n\nThe source code is hosted on GitHub at:\nhttps://github.com/YuukiToriyama/japanese-address-parser\n\n## Acknowledgements\n\nThis software was inspired\nby [@geolonia/normalize-japanese-addresses](https://github.com/geolonia/normalize-japanese-addresses).  \nIn addition, the parsing process uses [Geolonia \u4f4f\u6240\u30c7\u30fc\u30bf](https://github.com/geolonia/japanese-addresses) which is\nprovided by [\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.24",
    "project_urls": {
        "Source Code": "https://github.com/YuukiToriyama/japanese-address-parser"
    },
    "split_keywords": [
        "converter",
        " utility",
        " geo",
        " rust"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "554b78ffdac500eb829f43b3b21e28f3fddbac1e12c3d415ddd30b6aaaa179be",
                "md5": "476d8ba2971218c6e8a9717ba482163c",
                "sha256": "a1ad64eede2626e0a0d280242d366e21f494cc7b0c4e51925fbd1203f78cb060"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "476d8ba2971218c6e8a9717ba482163c",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1974345,
            "upload_time": "2024-11-10T10:20:31",
            "upload_time_iso_8601": "2024-11-10T10:20:31.557997Z",
            "url": "https://files.pythonhosted.org/packages/55/4b/78ffdac500eb829f43b3b21e28f3fddbac1e12c3d415ddd30b6aaaa179be/japanese_address_parser_py-0.1.24-cp37-abi3-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c7113a8cfd4161dc84836c1c069d210307cb365176c6710302e9e24e6b49d026",
                "md5": "d3f2f2c1e73ab65db467a5787e179cd9",
                "sha256": "a350afbf974c738891609624e40a37732713b1b497eb185be84cfb2ab3d3eced"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "d3f2f2c1e73ab65db467a5787e179cd9",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1891174,
            "upload_time": "2024-11-10T10:20:30",
            "upload_time_iso_8601": "2024-11-10T10:20:30.173243Z",
            "url": "https://files.pythonhosted.org/packages/c7/11/3a8cfd4161dc84836c1c069d210307cb365176c6710302e9e24e6b49d026/japanese_address_parser_py-0.1.24-cp37-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "558893a522bfc255ae3ef0de76c3477eaf16204cf77178119e6cb0dda5f59e41",
                "md5": "6b187bef68ebaf4240d085068660f918",
                "sha256": "34fd6286d1dde7acf496bf3cfd6fe7d381f890d563cc8c7282fd92e6377a4b5f"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "6b187bef68ebaf4240d085068660f918",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1756844,
            "upload_time": "2024-11-10T10:20:18",
            "upload_time_iso_8601": "2024-11-10T10:20:18.822500Z",
            "url": "https://files.pythonhosted.org/packages/55/88/93a522bfc255ae3ef0de76c3477eaf16204cf77178119e6cb0dda5f59e41/japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "35213189e0d8e090578fdb81fe72d75c6e241cbf849f0eb25301f0644309eba9",
                "md5": "8a6b1757b1aba9e7a1dd7a91dee72ae9",
                "sha256": "b43e064a4cffe8115e9733fc8e32ef83b11ac901410c359ee9ceaf9b551b7a11"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "8a6b1757b1aba9e7a1dd7a91dee72ae9",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1546953,
            "upload_time": "2024-11-10T10:20:21",
            "upload_time_iso_8601": "2024-11-10T10:20:21.596753Z",
            "url": "https://files.pythonhosted.org/packages/35/21/3189e0d8e090578fdb81fe72d75c6e241cbf849f0eb25301f0644309eba9/japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "857e711f594c0e86caaed033ac0eefc13d93f6baa04790df43473289a7e34cde",
                "md5": "a43804db67ccf4456d7cb928a5081976",
                "sha256": "92e5d41f7c5f910f1213e643860351f1866e18dd9b222e96524f8c9c45448843"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "a43804db67ccf4456d7cb928a5081976",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1846078,
            "upload_time": "2024-11-10T10:20:26",
            "upload_time_iso_8601": "2024-11-10T10:20:26.380477Z",
            "url": "https://files.pythonhosted.org/packages/85/7e/711f594c0e86caaed033ac0eefc13d93f6baa04790df43473289a7e34cde/japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7e04c262e205dbed22978cda6163783ed58cb4236fd0b12637584d23a2276599",
                "md5": "5dc875ff1e952b72cd2e005fde12740e",
                "sha256": "474088cdedffd3913245151dd21e54c03036be6af499e79b6c774d53437fc746"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "5dc875ff1e952b72cd2e005fde12740e",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1807414,
            "upload_time": "2024-11-10T10:20:22",
            "upload_time_iso_8601": "2024-11-10T10:20:22.914189Z",
            "url": "https://files.pythonhosted.org/packages/7e/04/c262e205dbed22978cda6163783ed58cb4236fd0b12637584d23a2276599/japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b27d47be0b0e2205cb10abe13e0b125b46683f9d0be7a2637458f1494e3b0cd7",
                "md5": "f041a00771b85e42d44dd50e28a48d53",
                "sha256": "bdc3e27f82c59238502a11058c87654b318ffc4a4905491486e263f4c4d0f51e"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "f041a00771b85e42d44dd50e28a48d53",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 2259300,
            "upload_time": "2024-11-10T10:20:24",
            "upload_time_iso_8601": "2024-11-10T10:20:24.373651Z",
            "url": "https://files.pythonhosted.org/packages/b2/7d/47be0b0e2205cb10abe13e0b125b46683f9d0be7a2637458f1494e3b0cd7/japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1875e1f4bcf27c372eed72aec3d44991e3a14470f8cd501740779f672ef8796a",
                "md5": "92b8a069f19a0daa7ad9e51a053504fa",
                "sha256": "390538ce2679d443adb10a5cbd7a5e599043382804875b0abc5aa66587c0dcf0"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "92b8a069f19a0daa7ad9e51a053504fa",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1882996,
            "upload_time": "2024-11-10T10:20:28",
            "upload_time_iso_8601": "2024-11-10T10:20:28.793031Z",
            "url": "https://files.pythonhosted.org/packages/18/75/e1f4bcf27c372eed72aec3d44991e3a14470f8cd501740779f672ef8796a/japanese_address_parser_py-0.1.24-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "46bc6bc49602308011af78aaa36f2f7e895dceb63ad505cd6393f2c94df76c47",
                "md5": "1f2d37ea60c45580e386afd886f80e6a",
                "sha256": "6d4678827a0d22a5c2c72ea3021d121f7c1ac531ebdc15d7cec80ef283a2a6f7"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-win32.whl",
            "has_sig": false,
            "md5_digest": "1f2d37ea60c45580e386afd886f80e6a",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1462189,
            "upload_time": "2024-11-10T10:20:36",
            "upload_time_iso_8601": "2024-11-10T10:20:36.532680Z",
            "url": "https://files.pythonhosted.org/packages/46/bc/6bc49602308011af78aaa36f2f7e895dceb63ad505cd6393f2c94df76c47/japanese_address_parser_py-0.1.24-cp37-abi3-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d5bfd92af1e73d8f45c3797fc86f4804e2fb69ce079bd6cba08a4c7925c8ccce",
                "md5": "a68b4f5957673ec22d5cde93707cfb27",
                "sha256": "3d527d5c9f781ff30b77b6cf73854ecab2a6a87864920ec3f2cb0336a980293c"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24-cp37-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "a68b4f5957673ec22d5cde93707cfb27",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1751093,
            "upload_time": "2024-11-10T10:20:35",
            "upload_time_iso_8601": "2024-11-10T10:20:35.165528Z",
            "url": "https://files.pythonhosted.org/packages/d5/bf/d92af1e73d8f45c3797fc86f4804e2fb69ce079bd6cba08a4c7925c8ccce/japanese_address_parser_py-0.1.24-cp37-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0107f5021b3b53ca70fd9c72f78c7b5a05fbf6c67cdde09b207383faa962e90b",
                "md5": "316ccd91716ea20c845a96377d60cf43",
                "sha256": "63b700212b247d1624719b923ac9ab270e68f640ebe496d121ec8baba2788999"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.1.24.tar.gz",
            "has_sig": false,
            "md5_digest": "316ccd91716ea20c845a96377d60cf43",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 49809,
            "upload_time": "2024-11-10T10:20:33",
            "upload_time_iso_8601": "2024-11-10T10:20:33.457184Z",
            "url": "https://files.pythonhosted.org/packages/01/07/f5021b3b53ca70fd9c72f78c7b5a05fbf6c67cdde09b207383faa962e90b/japanese_address_parser_py-0.1.24.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-10 10:20:33",
    "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.43323s