โ† Language detection: all libraries ยท Reader board

Lingua vs py3langid: which one detects the language right more often?

Lingua 2.2.0 and py3langid 0.4.0 on the same 760 texts with a known language: 570 single sentences and 190 short paragraphs in 38 languages, from Tatoeba from Language test set (Tatoeba sentences, 38 languages). Measured, not opinion; re-tested by itself on every new PyPI release. Updated 06 November 2026.

More detected correctlypy3langid97.0% vs 94.6%
Faster on this setLingua0.5 s vs 0.5 s total (about as fast)
Both read760only Lingua: 0 ยท only py3langid: 0

py3langid got the language right more often: 97.0% vs 94.6%. Lingua broke (error, hang or crash) on 0 files that py3langid read; py3langid broke on 0 files that Lingua read.

LibraryText from๐Ÿ”ด Fails where
the other reads
๐ŸŸก Empty where
the other reads
โฑ Hangs or
crashes
โœ… CorrectMedian
ms/file
Total
seconds
Lingua 2.2.076000094.6%<10.5
py3langid 0.4.076000097.0%<10.5

By kind of text: share correct

TextsLinguapy3langid
paragraphs 190 texts97.4%99.0%
short-sentences 570 texts93.7%96.3%

Files only Lingua reads (0)

None.

Files only py3langid reads (0)

None.

What this does not tell you

This compares not breaking: whether each library gets any text out of each file. It does not rank text quality (reading order, tables, headings), and speed is one GitHub-hosted runner, default settings, no OCR switched on. If you need structure for RAG, also look at the output on your own files.

How this is measured