whichlang
whichlang copied to clipboard
Is it about faster and slightly more accurate than lingua-rs?
Does Whichlang is about faster and slightly more accurate than lingua-rs?
Rem:
it should be noted that lingua-rss supports 75 languages compared to the 16 languages supported by whichlang
whatlang currently supports 68 languages.
Hi, I'm the author of lingua-rs. I've just released a new version of my library together with a detailed accuracy evaluation and performance benchmark.
- Yes, Whichlang needs much less processing time than Lingua. My benchmark yields the following results for determining the language of 2,000 sentences in Whichlang's 16 supported languages. Lingua is restricted to the same set of 16 languages.
| Single Thread | Multiple Threads | |
|---|---|---|
| Lingua / high accuracy mode | 333.31 ms | 37.347 ms |
| Lingua / low accuracy mode | 180.54 ms | 24.550 ms |
| Whichlang | 2.0458 ms | 351.03 µs |
- No, Whichlang is not more accurate than Lingua. On the contrary, Lingua still is the most accurate language detection library for Rust.
@pemistahl How did you limit Lingua to the same set of 16 languages?