fasttext-langdetect
80x faster and 95% accurate language identification with fastText
Decision gist · record as of 2026-08-14
Yes. Active maintenance, permissive MIT license, low install friction, no known vulnerabilities, and strong benchmark performance make this a solid choice for production language detection. The API is straightforward, and prebuilt wheels eliminate compilation overhead. Install it if you need fast, accurate language identification across 176 languages without external service calls.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or newer; models download and cache on first use (network access required).
- Low friction install with prebuilt wheels for all major platforms and Python versions 3.9–3.13; active maintenance with recent release 80 days ago and no compilation required.
License · maintenance · safety
permissive license (permissive) — MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects.
last release 2026-05-26 (80 days) · last repo commit 2026-05-26 · 172 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 194,294 downloads/mo, #9,839 on PyPI
Alternatives
Verify before relying
pip install fasttext-langdetect
from fasttext-langdetect import detect
result = detect(text="Bugün hava çok güzel", low_memory=False)
print(result)- Accuracy on code-switched or mixed-script text beyond the bilingual examples shown
- Performance characteristics on very long documents or streaming scenarios
- Behavior on text with heavy emoji, URLs, or special formatting
- Whether the module import name differs from the package name
What it is and what it does
fasttext-langdetect wraps Facebook's pretrained fastText language identification model (lid.176) in a simple Python API. It detects which of 176 languages a given UTF-8 string is written in, returning a language code and confidence score. The package handles multi-line input and whitespace normalization automatically, and offers a low-memory mode using a compressed model variant for memory-constrained environments.
The core use case is rapid, accurate language detection for text processing pipelines—content routing, multilingual NLP preprocessing, or user-generated content classification. It depends on fasttext-predict and requests, both of which install without compilation. Models are cached locally on first download and can be overridden via the FTLANG_CACHE environment variable.
Use it for
- Route user-submitted text to language-specific NLP pipelines or translation services
- Identify the language of social media posts or forum content for moderation or analysis
- Detect bilingual or code-switched text by requesting top-k candidate languages
- Preprocess multilingual datasets by filtering or grouping documents by detected language
- Build a language-aware search or recommendation system that respects user language preference
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, permissive MIT license, low install friction, no known vulnerabilities, and strong benchmark performance make this a solid choice for production language detection. The API is straightforward, and prebuilt wheels eliminate compilation overhead. Install it if you need fast, accurate language identification across 176 languages without external service calls.
Install
fasttext-langdetect on PyPI
Before you install
Low friction install with prebuilt wheels for all major platforms and Python versions 3.9–3.13; active maintenance with recent release 80 days ago and no compilation required.
Requires Python 3.9 or newer; models download and cache on first use (network access required).
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects.
Quickstart
pip install fasttext-langdetect
from fasttext-langdetect import detect
result = detect(text="Bugün hava çok güzel", low_memory=False)
print(result)
Verify before relying
- Accuracy on code-switched or mixed-script text beyond the bilingual examples shown
- Performance characteristics on very long documents or streaming scenarios
- Behavior on text with heavy emoji, URLs, or special formatting
- Whether the module import name differs from the package name
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesfasttext-predictrequests |
| Maintenance | Actively maintained 80 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 194,294 / month, #9,839 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Information AnalysisTopic :: Text Processing :: LinguisticTyping :: Typed |
Evidence: fasttext_langdetect-1.1.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
An agent finds packages by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language. Give your agent the search over MCP.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also fast-langdetect · langdetect · fasttext-predict · langid · py3langid · pycld2 · lingua-language-detector · gcld3 · fasttext · minisbd