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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ovos_lang_detector_fasttext_plugin-0.1.3a4.tar.gz.
File metadata
- Download URL: ovos_lang_detector_fasttext_plugin-0.1.3a4.tar.gz
- Upload date:
- Size: 6.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab04612630a21cf66a1b95abdf2f18d3b71b92b178d0f2aee99b39e80c84ac36
|
|
| MD5 |
66b03545511cdfb3c76e5c1c573c4dca
|
|
| BLAKE2b-256 |
de789ed643ca2fbfabe30dfe82e7b5300133fd19e36b982c7c8aa48eef39648d
|
File details
Details for the file ovos_lang_detector_fasttext_plugin-0.1.3a4-py3-none-any.whl.
File metadata
- Download URL: ovos_lang_detector_fasttext_plugin-0.1.3a4-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd028e73f0a87884b887c538a7b4d1fd9a7fa498a4bd3bed6824df6e423f713e
|
|
| MD5 |
cfcab3960226d313bdb22dc06d62cd48
|
|
| BLAKE2b-256 |
7bd26c944528ebd3a83469d643e222d32f94ff3415b45a4c1db2e6f9ca7d5896
|