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

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

langdetect 1.0.9 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 correctlyfast-langdetect93.4% vs 93.0%
Faster on this setlangdetect1.3 s vs 1.5 s total (about as fast)
Both read760only langdetect: 0 ยท only fast-langdetect: 0

fast-langdetect got the language right more often: 93.4% vs 93.0%. langdetect broke (error, hang or crash) on 0 files that fast-langdetect read; fast-langdetect broke on 0 files that langdetect read.

LibraryText from๐Ÿ”ด Fails where
the other reads
๐ŸŸก Empty where
the other reads
โฑ Hangs or
crashes
โœ… CorrectMedian
ms/file
Total
seconds
langdetect 1.0.976000093.0%11.3
fast-langdetect 1.1.076000093.4%<11.5

By kind of text: share correct

Textslangdetectfast-langdetect
paragraphs 190 texts99.5%95.8%
short-sentences 570 texts90.9%92.6%

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