spacy-fastlang


Namespacy-fastlang JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/thomasthiebaud/spacy-fastlang
SummaryLanguage detection using FastText and Spacy
upload_time2023-07-30 19:00:55
maintainer
docs_urlNone
authorThomas Thiebaud
requires_python>=3.8,<4.0
licenseMIT
keywords spacy fasttext language detection
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # spacy_fastlang

## Install

Assuming you have a working python environment, you can simply install it using

```
pip install spacy_fastlang
```

## Usage

The library exports a pipeline component called `language_detector` that will set two spacy extensions

- doc.\_.language = ISO code of the detected language or `xx` as a fallback
- doc.\_.language_score = confidence

```
import spacy_fastlang  # noqa: F401 # pylint: disable=unused-import
nlp = spacy.load("...")
nlp.add_pipe("language_detector")
doc = nlp(en_text)

doc._.language == "..."
doc._.language_score >= ...
```

## Options

[Check the tests](./tests/test_spacy_fastlang.py) to see more examples and available options

## License

Everythin is under `MIT` except the default model which is distributed under [Creative Commons Attribution-Share-Alike License 3.0](https://creativecommons.org/licenses/by-sa/3.0/) by facebook [here](https://fasttext.cc/docs/en/language-identification.html)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thomasthiebaud/spacy-fastlang",
    "name": "spacy-fastlang",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "spacy,fasttext,language,detection",
    "author": "Thomas Thiebaud",
    "author_email": "thiebaud.tom@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/8d/2a/76bb5328496f5019e0d1ff5760c6ac30f867ada79fa42ed9d3c16ebde014/spacy_fastlang-2.0.0.tar.gz",
    "platform": null,
    "description": "# spacy_fastlang\n\n## Install\n\nAssuming you have a working python environment, you can simply install it using\n\n```\npip install spacy_fastlang\n```\n\n## Usage\n\nThe library exports a pipeline component called `language_detector` that will set two spacy extensions\n\n- doc.\\_.language = ISO code of the detected language or `xx` as a fallback\n- doc.\\_.language_score = confidence\n\n```\nimport spacy_fastlang  # noqa: F401 # pylint: disable=unused-import\nnlp = spacy.load(\"...\")\nnlp.add_pipe(\"language_detector\")\ndoc = nlp(en_text)\n\ndoc._.language == \"...\"\ndoc._.language_score >= ...\n```\n\n## Options\n\n[Check the tests](./tests/test_spacy_fastlang.py) to see more examples and available options\n\n## License\n\nEverythin is under `MIT` except the default model which is distributed under [Creative Commons Attribution-Share-Alike License 3.0](https://creativecommons.org/licenses/by-sa/3.0/) by facebook [here](https://fasttext.cc/docs/en/language-identification.html)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Language detection using FastText and Spacy",
    "version": "2.0.0",
    "project_urls": {
        "Documentation": "https://github.com/thomasthiebaud/spacy-fastlang",
        "Homepage": "https://github.com/thomasthiebaud/spacy-fastlang",
        "Repository": "https://github.com/thomasthiebaud/spacy-fastlang"
    },
    "split_keywords": [
        "spacy",
        "fasttext",
        "language",
        "detection"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5094576ddc9dcf6841e0b7effbc0bda4f30696053e582b68407e888d6c98bb0e",
                "md5": "96c151c2c270741e87f103eb2dd6d0bb",
                "sha256": "bed792486c8e8fe3c2c4e7566134f0980173525c200c0a5e285bcc98c9c7bd3c"
            },
            "downloads": -1,
            "filename": "spacy_fastlang-2.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96c151c2c270741e87f103eb2dd6d0bb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 780388,
            "upload_time": "2023-07-30T19:00:53",
            "upload_time_iso_8601": "2023-07-30T19:00:53.416947Z",
            "url": "https://files.pythonhosted.org/packages/50/94/576ddc9dcf6841e0b7effbc0bda4f30696053e582b68407e888d6c98bb0e/spacy_fastlang-2.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8d2a76bb5328496f5019e0d1ff5760c6ac30f867ada79fa42ed9d3c16ebde014",
                "md5": "dda54f919ec49e26fc53506226fc55b0",
                "sha256": "2c8408a985b34c5fceb87f2261ddabb5341cd5c202809fc7e0d464187f54dbfb"
            },
            "downloads": -1,
            "filename": "spacy_fastlang-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "dda54f919ec49e26fc53506226fc55b0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 782372,
            "upload_time": "2023-07-30T19:00:55",
            "upload_time_iso_8601": "2023-07-30T19:00:55.289464Z",
            "url": "https://files.pythonhosted.org/packages/8d/2a/76bb5328496f5019e0d1ff5760c6ac30f867ada79fa42ed9d3c16ebde014/spacy_fastlang-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-30 19:00:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thomasthiebaud",
    "github_project": "spacy-fastlang",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "spacy-fastlang"
}
        
Elapsed time: 0.28510s