← Language detection: all libraries · Reader board

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

langdetect 1.0.9 and langid 1.1.6 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 correctlylangdetect93.0% vs 89.1%
Faster on this setlangdetect1.3 s vs 2.5 s total (2× faster)
Both read760only langdetect: 0 · only langid: 0

langdetect got the language right more often: 93.0% vs 89.1%. langdetect broke (error, hang or crash) on 0 files that langid read; langid 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
langid 1.1.676000089.1%12.5

By kind of text: share correct

Textslangdetectlangid
paragraphs 190 texts99.5%99.5%
short-sentences 570 texts90.9%85.6%

Files only langdetect reads (0)

None.

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