Lingua
The most accurate natural language detection library for Rust, suitable for short text and mixed-language text observed · 2026-09-03
Health v2 · maintenance only
87/100
- Activity 100
- Release rhythm 62
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 67
- age_days: 2268
- days_rel: 177
- days_push: 0
- n_releases_24m: 4
Adoption not part of the score
1129 stars · 63 forks observed · 2026-09-03
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Lingua is a language detection library for Python (with a Rust core) that identifies which of 75 languages a text is written in. It is designed for high accuracy on short and mixed-language text, using rule-based and statistical Naive Bayes methods entirely offline.
Use cases
- detect the language of a short text snippet like a tweet
- identify language of single words or phrases
- preprocess text for language-specific NLP pipelines
- route customer emails by language
- detect language in mixed-language text
- run language detection offline without external APIs
When to choose
- you need accurate detection on very short text where CLD3 or langid fail
- you need offline detection without network calls
- you need support for many languages with mixed-language input
When to avoid
- you need neural-network-based detection or embeddings
- you work with Python < 3.12
- you need extremely lightweight detection of only a few major languages
Facets
library · maturity active
nlp parser machine-learning python rust cross-platform language-detection language-identification offline naive-bayes short-text natural-language-processing
1 source
- readme: https://github.com/pemistahl/lingua-rs · fetched 2026-09-03 · 796557c1e674
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| pemistahl/lingua-rs | main | 87 |
| pemistahl/lingua-py | sdk | 84 |
For agents
markdown · JSON · MCP: product_card(name="pemistahl/lingua-rs")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem