#94 · Primary category: NLP Tools & Text Processing

whatlang-rs

ai algorithm classifier detect-language language language-recognition nlp rust rustlang text-analysis text-classification text-classifier whatlang

Natural language detection library for Rust. Try demo online: https://whatlang.org/

Project last updated:12/24/25

GitHub Stars

1.1K

Forks

119

Contributors

26

License

MIT

Why we included this project

Rust teams that need to know what language a string is written in often face a choice between pulling in a heavy ML dependency or writing their own heuristics. Whatlang is a small pure-Rust crate that sidesteps both: it uses trigram language models to return both the language and the script (Latin, Cyrillic, and so on) for a text snippet, along with a confidence score and an is_reliable flag. That flag is handy when you want to fall back to another method when the guess looks shaky. The crate has no runtime dependencies, and optional serde and enum-map support means it slots into an existing backend or search pipeline without forcing architectural changes. If you already run Rust in your stack, this is a convenient way to tag or route content by language.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category