whichlang icon indicating copy to clipboard operation
whichlang copied to clipboard

Is it about faster and slightly more accurate than lingua-rs?

Open LeMoussel opened this issue 2 years ago • 4 comments

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

LeMoussel avatar May 24 '23 12:05 LeMoussel

whatlang currently supports 68 languages.

getreu avatar May 28 '23 04:05 getreu

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.

  1. 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

  1. No, Whichlang is not more accurate than Lingua. On the contrary, Lingua still is the most accurate language detection library for Rust.
Average Detection Performance

All benchmark results are available here and here.

pemistahl avatar Jun 13 '23 18:06 pemistahl

@pemistahl How did you limit Lingua to the same set of 16 languages?

LeMoussel avatar Jun 21 '23 10:06 LeMoussel