← Language detection: all libraries · Reader board

Lingua vs fast-langdetect: which one detects the language right more often?

Lingua 2.2.0 and fast-langdetect 1.1.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 correctlyLingua94.6% vs 93.4%
Faster on this setLingua0.5 s vs 1.5 s total (3× faster)
Both read760only Lingua: 0 · only fast-langdetect: 0

Lingua got the language right more often: 94.6% vs 93.4%. Lingua broke (error, hang or crash) on 0 files that fast-langdetect read; fast-langdetect 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
fast-langdetect 1.1.076000093.4%<11.5

By kind of text: share correct

TextsLinguafast-langdetect
paragraphs 190 texts97.4%95.8%
short-sentences 570 texts93.7%92.6%

Files only Lingua reads (0)

None.

Files only fast-langdetect 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