This release is a pre-release and may not be stable for production use.
linguonnx
Language identification and machine translation on CPU, with ONNX Runtime and no torch.
linguonnx.detectidentifies the language of a text with ONNX exports of four fastText classifiers: GlotLID, lid.176, OpenLID and OpenLID-v2.linguonnx.translatetranslates with Marian (opus-mt), M2M100, NLLB-200 and MADLAD exports. A routing graph selects the model, or the chain of models, for a language pair.
Install
pip install linguonnx
Quickstart
from linguonnx import load_detector, load_translator
det = load_detector() # glotlid-int8, 425 MB on first use
print(det.detect("Egun on, zer moduz?")) # 'eu'
print(det.detect("وش لونك يا خوي", collapse_varieties=True)) # 'ar'
tx = load_translator()
print(tx.translate("bom dia, como estás?", src="pt", tgt="en"))
# 'Good morning, how are you?'
route = tx.route("pt", "eu", prefer="dedicated")
print(route.model_ids) # ('aina-translator-pt-ca-int8', 'mt-hitz-ca-eu-int8')
print(route.pivots) # ('ca',)
A pair that no single model covers goes through a third language. The Route
shows each model and each pivot language.
Documentation
| Page | Contents |
|---|---|
| docs/index.md | What ships, and the reading order |
| docs/install.md | Extras, GPU, the model cache, OpenVoiceOS, development |
| docs/detect.md | Language identification |
| docs/translate.md | The translation API |
| docs/routing.md | How the router selects a route |
| docs/models.md | The model registry |
| docs/licences.md | Licence tiers and non-commercial models |
| docs/reference.md | Every public name |
| docs/contributing.md | Add a model to the registry |
Licence
linguonnx is Apache-2.0. Some models have other licences: OpenLID is
GPL-3.0, and NLLB-200 is CC-BY-NC-4.0. The default translation graph has no
non-commercial model. See docs/licences.md.
Metadata
Release files for linguonnx 0.26.10a4
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 |
|---|---|---|---|---|
| linguonnx-0.26.10a4.tar.gz | 359.5 kB | Without provenance | Details for linguonnx-0.26.10a4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linguonnx-0.26.10a4-py3-none-any.whl | Python 3 | none | any | Details for linguonnx-0.26.10a4-py3-none-any.whl |
Total release size: 540.2 kB
Release files / linguonnx-0.26.10a4.tar.gz
| Download URL | linguonnx-0.26.10a4.tar.gz |
|---|---|
| Size | 359.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
454a010803a31cb098e41bcc3e43d1a346553c22ab5d4f0570bca4f2e85d1697
|
|
BLAKE2b-256 checksum How to use checksums |
38f2ed843da454a4bf5ba9f0f7261f09b1b5078ed0132a1ce42475f7130e798a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Release files / linguonnx-0.26.10a4-py3-none-any.whl
| Download URL | linguonnx-0.26.10a4-py3-none-any.whl |
|---|---|
| Size | 180.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a50b562052089fc257c9578c14d9dec2f3dc0c11aba26753c2cb011d3a4b3a9
|
|
BLAKE2b-256 checksum How to use checksums |
ca0baa24550ce7aec655bb474b61604c4a6860e4b79129e15e2cae864f743268
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Security for linguonnx 0.26.10a4
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.