pemistahl/lingua-rs

The most accurate natural language detection library for Rust, suitable for short text and mixed-language text

66
/ 100
Established

Based on the README, here's a technical summary: Combines rule-based and statistical Naive Bayes classification without neural networks or external dictionaries, enabling offline language detection from single words to full sentences across 75 languages. Trained on Leipzig University corpora with separate train/test splits from news data, delivering measurably higher accuracy on short text than competing libraries like CLD2 and Whatlang. Includes minimal configuration requirements and ships with bundled language models for immediate use without API dependencies.

1,067 stars and 235,303 monthly downloads. Actively maintained with 2 commits in the last 30 days.

No Package No Dependents
Maintenance 16 / 25
Adoption 20 / 25
Maturity 16 / 25
Community 14 / 25

How are scores calculated?

Stars

1,067

Forks

53

Language

Rust

License

Apache-2.0

Last pushed

Mar 09, 2026

Monthly downloads

235,303

Commits (30d)

2

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/nlp/pemistahl/lingua-rs"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.