lingua-py-unofficial


Namelingua-py-unofficial JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryPython bindings for the Lingua(LanguageDetect) Rust library
upload_time2023-11-10 03:34:27
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11, <3.12
licenseNone
keywords nlp language-detect rust rust-library python-bindings
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
  
  ![Static Badge](https://img.shields.io/badge/dependency_version%3Alingua-1.5.0-blue)
  [![build status](https://github.com/chatblanc-ciel/lingua-py/actions/workflows/CI.yml/badge.svg)](https://github.com/chatblanc-ciel/lingua-py/actions/workflows/CI.yml)
  ![PyPI - Version](https://img.shields.io/pypi/v/lingua_py)
  [![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
</div>

<br>

# Lingua-py

Lingua-py is an Python wrapper for the [Rust][1] [lingua][2] crate with [PyO3/Maturin][4].
This project is informal. It is expected that Python-binding will be developed [officially][2] in the future.


## Summary

Lingua is a NIF-based bridge for the [lingua][2] [Rust][1] language detection library.

## Usage 

In imitation of [Upstream][3], introduce basic usage.
Alternatively please see [`tests` section](https://github.com/chatblanc-ciel/lingua-py/tree/master/python/tests/small_usage).

### 10.1 [Basic usage](https://github.com/pemistahl/lingua-rs#101-basic-usage)

```python
    languages: list[Language] = [Language.English, Language.Japanese]
    detector: LanguageDetector = LanguageDetectorBuilder.from_languages(
        languages
    ).build()

    expected: Language = Language.Japanese
    actual: Language = detector.detect_language_of("これは何語ですか?")

    assert actual == expected
```
<details>
<summary>pytest command</summary>

```bash
rye sync --no-lock
rye run python -m pytest -s -vv python/tests/small_usage/test_basic.py::test_basic
```
</details>


# License

[Apache License v2](./LICENSE), and lingua-rs is also [Apache License v2](https://github.com/pemistahl/lingua-rs/blob/master/LICENSE).






[1]: https://www.rust-lang.org 
[2]: https://crates.io/crates/lingua
[3]: https://github.com/pemistahl/lingua-rs.git
[4]: https://www.maturin.rs/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "lingua-py-unofficial",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11, <3.12",
    "maintainer_email": null,
    "keywords": "nlp,language-detect,rust,rust-library,python-bindings",
    "author": null,
    "author_email": "chatblanc <73688885+chatblanc-ciel@users.noreply.github.com>",
    "download_url": "https://files.pythonhosted.org/packages/7f/6c/bfa65c2d75cb9fd62815b7195d36fa83360e912957ce4e59c5e159e4ceca/lingua_py_unofficial-0.1.2.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n  \n  ![Static Badge](https://img.shields.io/badge/dependency_version%3Alingua-1.5.0-blue)\n  [![build status](https://github.com/chatblanc-ciel/lingua-py/actions/workflows/CI.yml/badge.svg)](https://github.com/chatblanc-ciel/lingua-py/actions/workflows/CI.yml)\n  ![PyPI - Version](https://img.shields.io/pypi/v/lingua_py)\n  [![license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)\n</div>\n\n<br>\n\n# Lingua-py\n\nLingua-py is an Python wrapper for the [Rust][1] [lingua][2] crate with [PyO3/Maturin][4].\nThis project is informal. It is expected that Python-binding will be developed [officially][2] in the future.\n\n\n## Summary\n\nLingua is a NIF-based bridge for the [lingua][2] [Rust][1] language detection library.\n\n## Usage \n\nIn imitation of [Upstream][3], introduce basic usage.\nAlternatively please see [`tests` section](https://github.com/chatblanc-ciel/lingua-py/tree/master/python/tests/small_usage).\n\n### 10.1 [Basic usage](https://github.com/pemistahl/lingua-rs#101-basic-usage)\n\n```python\n    languages: list[Language] = [Language.English, Language.Japanese]\n    detector: LanguageDetector = LanguageDetectorBuilder.from_languages(\n        languages\n    ).build()\n\n    expected: Language = Language.Japanese\n    actual: Language = detector.detect_language_of(\"\u3053\u308c\u306f\u4f55\u8a9e\u3067\u3059\u304b\uff1f\")\n\n    assert actual == expected\n```\n<details>\n<summary>pytest command</summary>\n\n```bash\nrye sync --no-lock\nrye run python -m pytest -s -vv python/tests/small_usage/test_basic.py::test_basic\n```\n</details>\n\n\n# License\n\n[Apache License v2](./LICENSE), and lingua-rs is also [Apache License v2](https://github.com/pemistahl/lingua-rs/blob/master/LICENSE).\n\n\n\n\n\n\n[1]: https://www.rust-lang.org \n[2]: https://crates.io/crates/lingua\n[3]: https://github.com/pemistahl/lingua-rs.git\n[4]: https://www.maturin.rs/\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Python bindings for the Lingua(LanguageDetect) Rust library",
    "version": "0.1.2",
    "project_urls": {
        "Repository": "https://github.com/chatblanc-ciel/lingua-py.git"
    },
    "split_keywords": [
        "nlp",
        "language-detect",
        "rust",
        "rust-library",
        "python-bindings"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "6567633c22fce7a54bcd26fb46bdb4fde88dddf2c068210d06d4a4c142e50b0d",
                "md5": "4dd228628e529d9dc6fafaec9ab51e9a",
                "sha256": "3d854977eb6a32f98377c1d3c82b7c7c758fe2834149768fcf4de5a6649a2d7c"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-macosx_10_7_x86_64.whl",
            "has_sig": false,
            "md5_digest": "4dd228628e529d9dc6fafaec9ab51e9a",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 73315599,
            "upload_time": "2023-11-10T03:33:22",
            "upload_time_iso_8601": "2023-11-10T03:33:22.899553Z",
            "url": "https://files.pythonhosted.org/packages/65/67/633c22fce7a54bcd26fb46bdb4fde88dddf2c068210d06d4a4c142e50b0d/lingua_py_unofficial-0.1.2-cp311-abi3-macosx_10_7_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f3f9dcc574ac2b66ffc6658acb9a47f96ef539f1ccafadfe7274a8ad5a12dff0",
                "md5": "3fdb2c3f7fbeb697e30c6f703f6848e8",
                "sha256": "c457739365b80cb956ca10082045209b790835e15ab98b327354025e424cd6b7"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "3fdb2c3f7fbeb697e30c6f703f6848e8",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 73784718,
            "upload_time": "2023-11-10T03:33:29",
            "upload_time_iso_8601": "2023-11-10T03:33:29.736218Z",
            "url": "https://files.pythonhosted.org/packages/f3/f9/dcc574ac2b66ffc6658acb9a47f96ef539f1ccafadfe7274a8ad5a12dff0/lingua_py_unofficial-0.1.2-cp311-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "40d1426c5caf333ea4ba2076d41d8cc1caa1a5a02173a641399b1912a71a5e3a",
                "md5": "7dad5b03ae6f209c146b746f03edbafb",
                "sha256": "4dbdb78a92e1d32939523242bc11902aca5e68dcd11248a1ba92ee3c92bf9c4c"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_12_i686.manylinux2010_i686.whl",
            "has_sig": false,
            "md5_digest": "7dad5b03ae6f209c146b746f03edbafb",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 74391744,
            "upload_time": "2023-11-10T03:33:36",
            "upload_time_iso_8601": "2023-11-10T03:33:36.148302Z",
            "url": "https://files.pythonhosted.org/packages/40/d1/426c5caf333ea4ba2076d41d8cc1caa1a5a02173a641399b1912a71a5e3a/lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_12_i686.manylinux2010_i686.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "16e2bffb5ea612eeedf95de2705b190042f4233bbce70c0215311561dfedcff7",
                "md5": "16880dbaacf3eed03289c5700547a612",
                "sha256": "43fcb311bfa2cedd710357e205a4ac7dc604370e2b8f088347f936586b813aec"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "16880dbaacf3eed03289c5700547a612",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 74329764,
            "upload_time": "2023-11-10T03:33:42",
            "upload_time_iso_8601": "2023-11-10T03:33:42.418851Z",
            "url": "https://files.pythonhosted.org/packages/16/e2/bffb5ea612eeedf95de2705b190042f4233bbce70c0215311561dfedcff7/lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "20cb8c708eb3c46429e749a11869936434e6f49aebdc3d39d3348f7a9460ff8a",
                "md5": "69982d6b6ff54f9a84ded48b1962b09b",
                "sha256": "895a748512f70cb0c306ae4d36a844e3401efc5bb2992b68808724e4fe99f703"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "has_sig": false,
            "md5_digest": "69982d6b6ff54f9a84ded48b1962b09b",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 74288322,
            "upload_time": "2023-11-10T03:33:49",
            "upload_time_iso_8601": "2023-11-10T03:33:49.654021Z",
            "url": "https://files.pythonhosted.org/packages/20/cb/8c708eb3c46429e749a11869936434e6f49aebdc3d39d3348f7a9460ff8a/lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "a3906410b8360cef9805263ec8098671e969acde4ae392eac8e213372b9aa11e",
                "md5": "2e4161d15e201394eefe0bfaf0f5c3cf",
                "sha256": "dcb16d15c278ee489ac77f9f8f272639f968f345c7c96636c7f943d3fd38e60f"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "has_sig": false,
            "md5_digest": "2e4161d15e201394eefe0bfaf0f5c3cf",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 74721865,
            "upload_time": "2023-11-10T03:33:56",
            "upload_time_iso_8601": "2023-11-10T03:33:56.296787Z",
            "url": "https://files.pythonhosted.org/packages/a3/90/6410b8360cef9805263ec8098671e969acde4ae392eac8e213372b9aa11e/lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9cf92f404abfcdc3ee38c7068cf6d02556fdb1f18ebeb9ba614401b5aefb8a5f",
                "md5": "ac23bb384723f507f3b1747d25bafac0",
                "sha256": "b836f3b431a1aa1f3c11ddb0284abb9497d40c2cff655ea1325415c49141e424"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "has_sig": false,
            "md5_digest": "ac23bb384723f507f3b1747d25bafac0",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 74709252,
            "upload_time": "2023-11-10T03:34:03",
            "upload_time_iso_8601": "2023-11-10T03:34:03.369355Z",
            "url": "https://files.pythonhosted.org/packages/9c/f9/2f404abfcdc3ee38c7068cf6d02556fdb1f18ebeb9ba614401b5aefb8a5f/lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2c4444dc46113c3a3e11aa5ffdcb7e140037192a8543870af4eac14e688b5e38",
                "md5": "3e05fddd5fb9786f9a039b30029a52b3",
                "sha256": "662c114957cc7bb6911096632842e4207e97cc5351bf12b614f649c3d720465e"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "3e05fddd5fb9786f9a039b30029a52b3",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 74365210,
            "upload_time": "2023-11-10T03:34:09",
            "upload_time_iso_8601": "2023-11-10T03:34:09.815939Z",
            "url": "https://files.pythonhosted.org/packages/2c/44/44dc46113c3a3e11aa5ffdcb7e140037192a8543870af4eac14e688b5e38/lingua_py_unofficial-0.1.2-cp311-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "df6d2f16710ef6f548d00b4d326c8f0e4a95c0bdc5481f4ba820848f50985730",
                "md5": "234533fba04db21b104adf11bc27feca",
                "sha256": "d68c1e3a880c109c82a605dca09ac538a732b7c2c48547d915ec489aab9ca82e"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-win32.whl",
            "has_sig": false,
            "md5_digest": "234533fba04db21b104adf11bc27feca",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 72948528,
            "upload_time": "2023-11-10T03:34:16",
            "upload_time_iso_8601": "2023-11-10T03:34:16.517101Z",
            "url": "https://files.pythonhosted.org/packages/df/6d/2f16710ef6f548d00b4d326c8f0e4a95c0bdc5481f4ba820848f50985730/lingua_py_unofficial-0.1.2-cp311-abi3-win32.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "27766bcd95f602fcf9e168dede55e7b5b5202c709c149ce741bd8bd15c3eeb11",
                "md5": "56af4cd7bd744213e55d405c5e5d39e5",
                "sha256": "6786d2388643fb14e01f340ee5a9cea78439c1f9c37deff579aa18ff6ed9e736"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2-cp311-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "56af4cd7bd744213e55d405c5e5d39e5",
            "packagetype": "bdist_wheel",
            "python_version": "cp311",
            "requires_python": ">=3.11, <3.12",
            "size": 73032186,
            "upload_time": "2023-11-10T03:34:23",
            "upload_time_iso_8601": "2023-11-10T03:34:23.144888Z",
            "url": "https://files.pythonhosted.org/packages/27/76/6bcd95f602fcf9e168dede55e7b5b5202c709c149ce741bd8bd15c3eeb11/lingua_py_unofficial-0.1.2-cp311-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7f6cbfa65c2d75cb9fd62815b7195d36fa83360e912957ce4e59c5e159e4ceca",
                "md5": "3015306c963a31b16e8c308d762c6ed1",
                "sha256": "084693411b03d69bf53a74ccfcf8d83f7c1d66a3ab13ca68d056765c4c5a70ad"
            },
            "downloads": -1,
            "filename": "lingua_py_unofficial-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3015306c963a31b16e8c308d762c6ed1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11, <3.12",
            "size": 22605,
            "upload_time": "2023-11-10T03:34:27",
            "upload_time_iso_8601": "2023-11-10T03:34:27.664775Z",
            "url": "https://files.pythonhosted.org/packages/7f/6c/bfa65c2d75cb9fd62815b7195d36fa83360e912957ce4e59c5e159e4ceca/lingua_py_unofficial-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-10 03:34:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "chatblanc-ciel",
    "github_project": "lingua-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "lingua-py-unofficial"
}
        
Elapsed time: 0.14813s