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
Metadata
Release files for ovos-lang-detector-fasttext-plugin 0.1.3a8
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.3a8.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ovos_lang_detector_fasttext_plugin-0.1.3a8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.7 kB
Release files / ovos_lang_detector_fasttext_plugin-0.1.3a8.tar.gz
| Download URL | ovos_lang_detector_fasttext_plugin-0.1.3a8.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ce318f8d746ec3a00477e7c9fd6abda9830e6a62e4168e160379b483c2625cf
|
|
BLAKE2b-256 checksum How to use checksums |
5b4f89430a1dd76672d4ff61053c3d1af9f8400fb1459a4745bf0d4e62d6e4b0
|
| 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.3a8-py3-none-any.whl
| Download URL | ovos_lang_detector_fasttext_plugin-0.1.3a8-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
281922baa7ad7bfaeec7877ed8276770314ab21b5462c7b1f8d6c10297caeb5a
|
|
BLAKE2b-256 checksum How to use checksums |
0556ae4bd83cdbc0e09db7ccceb3372c562e122c07aabd57200650cdc5dd6e9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|