japanese-address-parser-py


Namejapanese-address-parser-py JSON
Version 0.2.2 PyPI version JSON
download
home_pageNone
SummaryA library for processing addresses of Japan
upload_time2025-01-14 23:50:37
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/2f/31/e47a5690bf2eb3ff53c4ce2f1f4a733fdf87128db7e817b33f5cdfe0235b/japanese_address_parser_py-0.2.2.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 library for processing addresses of Japan",
    "version": "0.2.2",
    "project_urls": {
        "Source Code": "https://github.com/YuukiToriyama/japanese-address-parser"
    },
    "split_keywords": [
        "converter",
        " utility",
        " geo",
        " rust"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "72374310f30c88c3c4655bd1a22e6a16140973cd78edb948762827681676e19e",
                "md5": "a08008910d020b86fb36738c10c9ba4d",
                "sha256": "b66f673a5ec420d3848462a1ad0616d65499750cd13d05d0efb36ed7924c9a5e"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "a08008910d020b86fb36738c10c9ba4d",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 2048000,
            "upload_time": "2025-01-14T23:50:35",
            "upload_time_iso_8601": "2025-01-14T23:50:35.835850Z",
            "url": "https://files.pythonhosted.org/packages/72/37/4310f30c88c3c4655bd1a22e6a16140973cd78edb948762827681676e19e/japanese_address_parser_py-0.2.2-cp37-abi3-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "0f0875672602963b7c147ce40bdc9ac40d40a08223d8da534d678b969bdf1362",
                "md5": "20ec0f9459c9ed245a4d9e462ccc15d3",
                "sha256": "5366fc9f99aa2584fe58508488119c8499d27587f8059bc5e6ef6f60f8992fd0"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "20ec0f9459c9ed245a4d9e462ccc15d3",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1908245,
            "upload_time": "2025-01-14T23:50:33",
            "upload_time_iso_8601": "2025-01-14T23:50:33.090915Z",
            "url": "https://files.pythonhosted.org/packages/0f/08/75672602963b7c147ce40bdc9ac40d40a08223d8da534d678b969bdf1362/japanese_address_parser_py-0.2.2-cp37-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fc3a13610d18ee846c059c97c39f248721c9d0743b0b8365f2887397e26b982b",
                "md5": "76d096063a5986329bd8eadbe551c652",
                "sha256": "35b94b894fd14206033e77f800de01573c65c74bc6944c4132661321fde3ec30"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "76d096063a5986329bd8eadbe551c652",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1768560,
            "upload_time": "2025-01-14T23:50:16",
            "upload_time_iso_8601": "2025-01-14T23:50:16.172681Z",
            "url": "https://files.pythonhosted.org/packages/fc/3a/13610d18ee846c059c97c39f248721c9d0743b0b8365f2887397e26b982b/japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a9d6b5150e79f37ad7221cbc1501c8c52dc7d216d3fdb9f5b47ab939b55231f8",
                "md5": "198300c97ac496ca03b6a255e80967a7",
                "sha256": "137593dbb237f93f98e4aef8a7ae82e2050270314a151092ba1423abb9086500"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "198300c97ac496ca03b6a255e80967a7",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1561072,
            "upload_time": "2025-01-14T23:50:18",
            "upload_time_iso_8601": "2025-01-14T23:50:18.466207Z",
            "url": "https://files.pythonhosted.org/packages/a9/d6/b5150e79f37ad7221cbc1501c8c52dc7d216d3fdb9f5b47ab939b55231f8/japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b17ea867a82e50efe2d110a35132c9fb46135e4b5b555a62b0c3ffa619dfeee7",
                "md5": "b570b1ca0427ae0091726bcea6b4bc1a",
                "sha256": "b13a69d4bd99349b6adc16ef2c2f82c9530a75ba346794493f14235b739237d7"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
            "has_sig": false,
            "md5_digest": "b570b1ca0427ae0091726bcea6b4bc1a",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1860984,
            "upload_time": "2025-01-14T23:50:28",
            "upload_time_iso_8601": "2025-01-14T23:50:28.909896Z",
            "url": "https://files.pythonhosted.org/packages/b1/7e/a867a82e50efe2d110a35132c9fb46135e4b5b555a62b0c3ffa619dfeee7/japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_i686.manylinux2014_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "eb9ce504bb17a9aa5570f04663c1c5027b6a86bdbdf8ec2cc5366ce33452c4c3",
                "md5": "6f4a8128024e392b50ed598769ec1aad",
                "sha256": "b7def84db0485b4eeff8e309e801aacea9ef835935ad7ee0ffcb16c51725eb81"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "6f4a8128024e392b50ed598769ec1aad",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1821477,
            "upload_time": "2025-01-14T23:50:24",
            "upload_time_iso_8601": "2025-01-14T23:50:24.691212Z",
            "url": "https://files.pythonhosted.org/packages/eb/9c/e504bb17a9aa5570f04663c1c5027b6a86bdbdf8ec2cc5366ce33452c4c3/japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "77fb706d88f279e28b25a01f2bfe4a19d1ef6d0bc97864b96767edf00d71870c",
                "md5": "5b1a8ad6b6d728362c0cc5dc0164d230",
                "sha256": "5b1bac359c9051efa2c9cccffdb2eed3e284aa71adc88cad6733448b8494966d"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "5b1a8ad6b6d728362c0cc5dc0164d230",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 2285192,
            "upload_time": "2025-01-14T23:50:27",
            "upload_time_iso_8601": "2025-01-14T23:50:27.387074Z",
            "url": "https://files.pythonhosted.org/packages/77/fb/706d88f279e28b25a01f2bfe4a19d1ef6d0bc97864b96767edf00d71870c/japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9f5d53d4246e5415d806445c042f8beae3d5a5f95f132e3020e419903768f185",
                "md5": "4f0e74a0d26aa7086599807aa5b67cdd",
                "sha256": "adf396f32e00d9fcd2dae1cf9f8960683f65a1c194b7ff8aab56740ce0867774"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4f0e74a0d26aa7086599807aa5b67cdd",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1918563,
            "upload_time": "2025-01-14T23:50:31",
            "upload_time_iso_8601": "2025-01-14T23:50:31.611118Z",
            "url": "https://files.pythonhosted.org/packages/9f/5d/53d4246e5415d806445c042f8beae3d5a5f95f132e3020e419903768f185/japanese_address_parser_py-0.2.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "76c3e891d84f9c2507c2882c11a432f44a85d6f80a607532ab13e2c0e6aa7976",
                "md5": "391ab393e854a6fbab4e1fa6e1c109fe",
                "sha256": "92f4bae9ae58f8bf4168d58f3b7af5fae24292dbaf88971cc9d2dc116b38e130"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-win32.whl",
            "has_sig": false,
            "md5_digest": "391ab393e854a6fbab4e1fa6e1c109fe",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1471209,
            "upload_time": "2025-01-14T23:50:41",
            "upload_time_iso_8601": "2025-01-14T23:50:41.023482Z",
            "url": "https://files.pythonhosted.org/packages/76/c3/e891d84f9c2507c2882c11a432f44a85d6f80a607532ab13e2c0e6aa7976/japanese_address_parser_py-0.2.2-cp37-abi3-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c674521edf84b1f5ced049a17ebd0ca18f1d5556de80bc17df6e48e4dbbead17",
                "md5": "9ecf0a2ec1d0e53f4dc82918a5f3023e",
                "sha256": "d5149ae93b87bc5140541a6ecb4554ec991485f38fb3c8e2b76bb58b64d8826d"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2-cp37-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "9ecf0a2ec1d0e53f4dc82918a5f3023e",
            "packagetype": "bdist_wheel",
            "python_version": "cp37",
            "requires_python": null,
            "size": 1761133,
            "upload_time": "2025-01-14T23:50:38",
            "upload_time_iso_8601": "2025-01-14T23:50:38.176367Z",
            "url": "https://files.pythonhosted.org/packages/c6/74/521edf84b1f5ced049a17ebd0ca18f1d5556de80bc17df6e48e4dbbead17/japanese_address_parser_py-0.2.2-cp37-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2f31e47a5690bf2eb3ff53c4ce2f1f4a733fdf87128db7e817b33f5cdfe0235b",
                "md5": "41c31101ee1bea252c88bfd1c03c7c14",
                "sha256": "9d53fd64e2d603064078d9c533817725681360b4ad26f1d5b559fafb7d697bc0"
            },
            "downloads": -1,
            "filename": "japanese_address_parser_py-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "41c31101ee1bea252c88bfd1c03c7c14",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 45414,
            "upload_time": "2025-01-14T23:50:37",
            "upload_time_iso_8601": "2025-01-14T23:50:37.113808Z",
            "url": "https://files.pythonhosted.org/packages/2f/31/e47a5690bf2eb3ff53c4ce2f1f4a733fdf87128db7e817b33f5cdfe0235b/japanese_address_parser_py-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-14 23:50:37",
    "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: 5.65297s