Skip to main content
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

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

ovos_lang_detector_fasttext_plugin-0.1.3a4.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file ovos_lang_detector_fasttext_plugin-0.1.3a4.tar.gz.

File metadata

File hashes

Hashes for ovos_lang_detector_fasttext_plugin-0.1.3a4.tar.gz
Algorithm Hash digest
SHA256 ab04612630a21cf66a1b95abdf2f18d3b71b92b178d0f2aee99b39e80c84ac36
MD5 66b03545511cdfb3c76e5c1c573c4dca
BLAKE2b-256 de789ed643ca2fbfabe30dfe82e7b5300133fd19e36b982c7c8aa48eef39648d

See more details on using hashes here.

File details

Details for the file ovos_lang_detector_fasttext_plugin-0.1.3a4-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_lang_detector_fasttext_plugin-0.1.3a4-py3-none-any.whl
Algorithm Hash digest
SHA256 cd028e73f0a87884b887c538a7b4d1fd9a7fa498a4bd3bed6824df6e423f713e
MD5 cfcab3960226d313bdb22dc06d62cd48
BLAKE2b-256 7bd26c944528ebd3a83469d643e222d32f94ff3415b45a4c1db2e6f9ca7d5896

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.3a4 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page