This release is a pre-release and may not be stable for production use.
Lang Classifier Classics
This package provides OVOS language-detection plugins for four classic algorithms:
- google/cld3: CLD3 is a neural network model for language identification.
- aboSamoor/pycld2: CLD2 is a Naive Bayesian classifier. It detects over 80 languages.
- kootenpv/fastlang: built on the NLTK stopword lists, without depending on NLTK itself.
- Mimino666/langdetect: detects the language of a text with a naive Bayesian filter.
The package also provides a VotingLangDetectPlugin. This plugin runs the other plugins and averages their predictions. Each model has a different bias, so the average is usually more accurate than any single model. See docs/algorithms.md for details on each algorithm and the voting logic.
To use the plugins above, run pip install ovos-lang-detector-classics-plugin[all]. If you only need the voter plugin, skip the [all] flag.
NOTE: The voter plugin works with any lang-detect plugin, not only the ones listed above.
Configuration
Add this to mycroft.conf:
"language": {
"detection_module": "ovos-lang-detector-plugin-voter",
"ovos-lang-detector-plugin-voter": {
"weights": {
"ovos-lang-detector-plugin-cld3": 0.8,
"ovos-lang-detector-plugin-cld2": 0.8,
"ovos-lang-detector-plugin-lingua-podre": 1.0,
"ovos-lang-detector-plugin-langdetect": 1.0,
"ovos-lang-detector-plugin-fastlang": 1.0,
}
}
},
Usage
weights = {
"ovos-lang-detector-plugin-cld3": 0.8,
"ovos-lang-detector-plugin-cld2": 0.8,
"ovos-lang-detector-plugin-lingua-podre": 1.0,
"ovos-lang-detector-plugin-langdetect": 1.0,
"ovos-lang-detector-plugin-fastlang": 1.0,
}
p = VotingLangDetectPlugin(config={"weights": weights})
for utt in ["hello world",
"olá mundo",
"hola mundo",
"once upon a time there was a voice assistant",
"era uma vez um assistente de voz"]:
print(p.detect(utt))
Related projects
- OpenVoiceOS/ovos-plugin-manager: defines the
LanguageDetectorbase class these plugins implement. - OpenVoiceOS/ovos-translate-server: a server that exposes language detection and translation plugins over HTTP.
Credits
The bundled plugins originally came from NeonGeckoCom but were never published on their own.
License
Apache-2.0
Metadata
Release files for ovos-lang-detector-classics-plugin 0.0.2a4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ovos_lang_detector_classics_plugin-0.0.2a4.tar.gz | 6.2 kB | Without provenance | Details for ovos_lang_detector_classics_plugin-0.0.2a4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ovos_lang_detector_classics_plugin-0.0.2a4-py3-none-any.whl | Python 3 | none | any | Details for ovos_lang_detector_classics_plugin-0.0.2a4-py3-none-any.whl |
Total release size: 13.9 kB
Release files / ovos_lang_detector_classics_plugin-0.0.2a4.tar.gz
| Download URL | ovos_lang_detector_classics_plugin-0.0.2a4.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0649ee72b4ff3da7b3c3007f14682eb7ee11c093b09ea9541180aec7e16432a4
|
|
BLAKE2b-256 checksum How to use checksums |
b1e5042334460e656892a9bbf778b2fada7d286bd6d96c73cc08017785e8b195
|
| 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_classics_plugin-0.0.2a4-py3-none-any.whl
| Download URL | ovos_lang_detector_classics_plugin-0.0.2a4-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e55cf8043d4fb9e5532647dfc9437b3793203847235d144fa6becd45370b2bd
|
|
BLAKE2b-256 checksum How to use checksums |
c2a9ca7b1aac44ec71b82cfe1fda2fdcff8999fc14fb76d02b5e114bd7d4218b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for ovos-lang-detector-classics-plugin 0.0.2a4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.