Pre-release
This release is a pre-release and may not be stable for production use.
FastText Language Identification
This plugin identifies the language of a text with the fasttext-language-identification model. Facebook AI Research trained this model as a companion to NLLB. The plugin downloads the model from the Hugging Face Hub on first use.
Install
pip install ovos-lang-detector-fasttext-plugin
Usage
Set this plugin as the language detection module in mycroft.conf:
"language": {
"detection_module": "ovos-lang-detector-fasttext-plugin"
},
You can also call the plugin directly:
from ovos_lang_detector_fasttext_plugin import FastTextLangDetectPlugin
clf = FastTextLangDetectPlugin()
print(clf.detect("olá mundo"))
print(clf.detect_probs("olá mundo"))
detect returns the most likely language code. detect_probs returns the top 5 language codes with their probabilities.
Related projects
- OpenVoiceOS/ovos-plugin-manager: defines the
LanguageDetectortemplate this plugin implements. - facebookresearch/fairseq: the NLLB project, source of the underlying language identification model.
License
Apache-2.0
Release files for ovos-lang-detector-fasttext-plugin 0.1.3a5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ovos_lang_detector_fasttext_plugin-0.1.3a5.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ovos_lang_detector_fasttext_plugin-0.1.3a5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.7 kB
Release files / ovos_lang_detector_fasttext_plugin-0.1.3a5.tar.gz
| Download URL | ovos_lang_detector_fasttext_plugin-0.1.3a5.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf5aa0cd31beb07e8c2a64ddf443f84d5e0ab27a970cc597bb183e103ce009a1
|
|
BLAKE2b-256 checksum How to use checksums |
cd177e8a4d83ab78236328cc7f3376475ad4bd956064c32437c2bc4774ebb592
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / ovos_lang_detector_fasttext_plugin-0.1.3a5-py3-none-any.whl
| Download URL | ovos_lang_detector_fasttext_plugin-0.1.3a5-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fe1f206bc7f84f87edf367c26a789ddf1981d1edcc8dbc40b25accd8c3f9ddd7
|
|
BLAKE2b-256 checksum How to use checksums |
a17e06878c8c730f42e05197bfc96ebe9e1ec8997661e79c8fa53c4c2725c4ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|