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.3a6
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.3a6.tar.gz | 6.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ovos_lang_detector_fasttext_plugin-0.1.3a6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.7 kB
Release files / ovos_lang_detector_fasttext_plugin-0.1.3a6.tar.gz
| Download URL | ovos_lang_detector_fasttext_plugin-0.1.3a6.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
980d178141958bb61125180e8b46181a5976285d558e3e9e107c365ae542c95a
|
|
BLAKE2b-256 checksum How to use checksums |
ec495604f5133c68c7060df949a8662c7f41cd46757ac24caf2d316ad07540ae
|
| 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.3a6-py3-none-any.whl
| Download URL | ovos_lang_detector_fasttext_plugin-0.1.3a6-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
35e65608d59f62fde2fcbed00c3b34612c4390796d5f7db83c845ccdbb967996
|
|
BLAKE2b-256 checksum How to use checksums |
7ab1df367521e2667dec5e3d77fdc7e897bbcff4c26f250a6ded3985ef4ec021
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|