fast-langdetect
fast-langdetect is an ultra-fast language detection library built on Facebook's FastText. It is approximately 80x faster than conventional detection methods while delivering up to 95% accuracy. The library supports Python 3.9 through 3.14 and requires no numpy dependency. It offers three model options: lite for offline, memory-friendly use (45-60 MB RAM), full for maximum accuracy (170-210 MB RAM), and auto which attempts the full model first and falls back to lite only on MemoryError. Models download to the system temp directory by default, with cache location customizable via the FTLANGCACHE environment variable or LangDetectConfig. The API centers on a detect function that returns a list of language candidates ordered by confidence score. Users can request top-k results or whole-text language splitting. A LangDetector class allows custom configuration and isolated model management, with instances maintaining their own in-memory model caches for reuse across calls. Best accuracy results come from input samp