# fasttext-language-detection
## Install
```shell
pip install fasttext-language-detection
```
## Usage
```python
from langdetection.detector import LanguageDetector
language_detector = LanguageDetector(low_memory=True)
text = 'Hello world!'
detection = language_detector.detect(text)
print(detection)
>> {'lang': 'en', 'prob': 0.22845280170440674}
```
## Tests
```shell
make run_tests
```
## List of supported languages
```
af als am an ar arz as ast av az azb ba bar bcl be bg bh bn bo bpy br bs bxr ca cbk ce ceb ckb co cs cv cy da de diq dsb dty dv el eml en eo es et eu fa fi fr frr fy ga gd gl gn gom gu gv he hi hif hr hsb ht hu hy ia id ie ilo io is it ja jbo jv ka kk km kn ko krc ku kv kw ky la lb lez li lmo lo lrc lt lv mai mg mhr min mk ml mn mr mrj ms mt mwl my myv mzn nah nap nds ne new nl nn no oc or os pa pam pfl pl pms pnb ps pt qu rm ro ru rue sa sah sc scn sco sd sh si sk sl so sq sr su sv sw ta te tg th tk tl tr tt tyv ug uk ur uz vec vep vi vls vo wa war wuu xal xmf yi yo yue zh
```
## License
The [fastetext models](https://fasttext.cc/docs/en/language-identification.html) are distributed under the [Creative Commons Attribution-Share-Alike License 3.0](https://fasttext.cc/docs/en/language-identification.html#:~:text=Creative%20Commons%20Attribution%2DShare%2DAlike%20License%203.0).
## References
[1] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov, Bag of Tricks for Efficient Text Classification
```
@article{joulin2016bag,
title={Bag of Tricks for Efficient Text Classification},
author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas},
journal={arXiv preprint arXiv:1607.01759},
year={2016}
}
```
[2] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. Jégou, T. Mikolov, FastText.zip: Compressing text classification models
```
@article{joulin2016fasttext,
title={FastText.zip: Compressing text classification models},
author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{\'e}gou, H{\'e}rve and Mikolov, Tomas},
journal={arXiv preprint arXiv:1612.03651},
year={2016}
}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/lang-ai/fasttext-language-detection",
"name": "fasttext-language-detection",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "language detection,language identification,fasttext",
"author": "Alberto Ezpondaburu",
"author_email": "aezpondaburu@lang.ai",
"download_url": "https://files.pythonhosted.org/packages/35/fa/43d8dcfdc8c26446beab4f682008c43d9a4d32df07357272bddd2676d004/fasttext-language-detection-0.4.tar.gz",
"platform": null,
"description": "# fasttext-language-detection\n\n## Install\n\n```shell\npip install fasttext-language-detection\n```\n\n## Usage\n\n```python\nfrom langdetection.detector import LanguageDetector\nlanguage_detector = LanguageDetector(low_memory=True)\ntext = 'Hello world!'\ndetection = language_detector.detect(text)\n\nprint(detection)\n>> {'lang': 'en', 'prob': 0.22845280170440674}\n```\n\n## Tests\n\n```shell\nmake run_tests\n```\n\n## List of supported languages\n\n```\naf als am an ar arz as ast av az azb ba bar bcl be bg bh bn bo bpy br bs bxr ca cbk ce ceb ckb co cs cv cy da de diq dsb dty dv el eml en eo es et eu fa fi fr frr fy ga gd gl gn gom gu gv he hi hif hr hsb ht hu hy ia id ie ilo io is it ja jbo jv ka kk km kn ko krc ku kv kw ky la lb lez li lmo lo lrc lt lv mai mg mhr min mk ml mn mr mrj ms mt mwl my myv mzn nah nap nds ne new nl nn no oc or os pa pam pfl pl pms pnb ps pt qu rm ro ru rue sa sah sc scn sco sd sh si sk sl so sq sr su sv sw ta te tg th tk tl tr tt tyv ug uk ur uz vec vep vi vls vo wa war wuu xal xmf yi yo yue zh\n```\n\n## License\nThe [fastetext models](https://fasttext.cc/docs/en/language-identification.html) are distributed under the [Creative Commons Attribution-Share-Alike License 3.0](https://fasttext.cc/docs/en/language-identification.html#:~:text=Creative%20Commons%20Attribution%2DShare%2DAlike%20License%203.0).\n\n## References\n\n[1] A. Joulin, E. Grave, P. Bojanowski, T. Mikolov, Bag of Tricks for Efficient Text Classification\n\n```\n@article{joulin2016bag,\n title={Bag of Tricks for Efficient Text Classification},\n author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Mikolov, Tomas},\n journal={arXiv preprint arXiv:1607.01759},\n year={2016}\n}\n```\n\n[2] A. Joulin, E. Grave, P. Bojanowski, M. Douze, H. J\u00e9gou, T. Mikolov, FastText.zip: Compressing text classification models\n\n\n```\n@article{joulin2016fasttext,\n title={FastText.zip: Compressing text classification models},\n author={Joulin, Armand and Grave, Edouard and Bojanowski, Piotr and Douze, Matthijs and J{\\'e}gou, H{\\'e}rve and Mikolov, Tomas},\n journal={arXiv preprint arXiv:1612.03651},\n year={2016}\n}\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Language detection wrapper with fasttext",
"version": "0.4",
"split_keywords": [
"language detection",
"language identification",
"fasttext"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "35fa43d8dcfdc8c26446beab4f682008c43d9a4d32df07357272bddd2676d004",
"md5": "162572ac58e027767283a28e8f155535",
"sha256": "d439203eb9aa151c8ee14b93a5999475969a9885b094be89317f5f803963a24c"
},
"downloads": -1,
"filename": "fasttext-language-detection-0.4.tar.gz",
"has_sig": false,
"md5_digest": "162572ac58e027767283a28e8f155535",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 783454,
"upload_time": "2023-01-10T09:24:27",
"upload_time_iso_8601": "2023-01-10T09:24:27.182725Z",
"url": "https://files.pythonhosted.org/packages/35/fa/43d8dcfdc8c26446beab4f682008c43d9a4d32df07357272bddd2676d004/fasttext-language-detection-0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-10 09:24:27",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "lang-ai",
"github_project": "fasttext-language-detection",
"lcname": "fasttext-language-detection"
}