For when you want fastText language identification, but you also want to believe the answers
Project description
lumi_language_id
Utilities for reliable-enough language detection.
This is a maintained fork of the original (archived) lumi-language-id,
updated to work with numpy 2.x. It is published on PyPI as
lumi-language-id-2, but the import name stays lumi_language_id:
pip install lumi-language-id-2 # or: uv add lumi-language-id-2
This package wraps fastText's "lid.176" language-detection model with another classifier, which is trained to produce better probability estimates. It also applies text cleaning, so that the text it detects is unaffected by punctuation, digits, or emoji.
Example:
>>> from lumi_language_id.tuned import TunedLanguageIdentifier
>>> lid = TunedLanguageIdentifier.load()
>>> lang, _prob = lid.detect_language("these are words")
>>> lang
'en'
>>> lang, _prob = lid.detect_language("aquí hay algunas palabras")
>>> lang
'es'
Project details
Release history Release notifications | RSS feed
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 lumi_language_id_2-2.0.0.tar.gz.
File metadata
- Download URL: lumi_language_id_2-2.0.0.tar.gz
- Upload date:
- Size: 850.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c12ef1d9d1f81e813fe3021de55d4c58870228dc20d3608159bb12675306efa
|
|
| MD5 |
a22f60869a93f77568b6f9218eeb5894
|
|
| BLAKE2b-256 |
1bec094a5b183efdf5c4c7997b890721ce820250a2a8e1d44e06c3c2c28f43fa
|
File details
Details for the file lumi_language_id_2-2.0.0-py3-none-any.whl.
File metadata
- Download URL: lumi_language_id_2-2.0.0-py3-none-any.whl
- Upload date:
- Size: 788.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
964e610aa49eff1316af95fee1652a5e0284d4e9f171850a22139fe73da3b8c9
|
|
| MD5 |
6f09137785c6988b1197850dc673c8cf
|
|
| BLAKE2b-256 |
a18c50ad428d5a097878d03a527bf00c774181c6931c4a3fc404c048497123c4
|