--- id: cld3-py version: "3.1.0" license: Copyright 2016 Google Inc. All rights reserved. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions.… (full text in the JSON record) license_treatment: permissive maintenance: active --- # cld3-py — Compact Language Detector v3 (CLD3) Python bindings — modernised fork with prebuilt wheels for Python 3.10–3.14. License: permissive · Maintenance: active · Downloads: 93.6K/mo ## What it is and what it does cld3-py is a Python wrapper around a neural network model for language identification. It takes text input and returns the detected language as a BCP-47 code (e.g., 'en' for English, 'bg-Latn' for Bulgarian in Latin script) along with a confidence probability, reliability flag, and proportion of the text in that language. The model works by extracting character n-grams from input, hashing them to embedding vectors, and passing the averaged embeddings through a neural network with a hidden layer and softmax output. The package is a modernized fork with prebuilt wheels for recent Python versions and multiple platforms, eliminating the need to compile C++ code during installation on most systems. It supports Python 3.10 through 3.14 (including free-threaded builds) and runs on macOS, Linux, and Windows. The API is backward-compatible with the original gcld3 package, so existing code imports work unchanged. Use it for: - Automatically classify user-generated content by language for routing to appropriate moderation or translation pipelines - Detect language in multilingual documents to split and process sections separately - Filter or prioritize search results by language without relying on HTTP headers or user metadata - Identify the primary language of web pages or social media posts for content aggregation - Validate language metadata in datasets or correct misclassified language tags ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Identifies the language of text using a neural network model, returning language codes with confidence scores and reliability indicators. Yes, if you need reliable language detection without external API calls or heavy dependencies. The prebuilt wheels make installation straightforward on common platforms, the Apache License is permissive, and active maintenance ensures compatibility with current Python versions. Medium install friction is acceptable for a compiled model. Verify accuracy on your specific text types before production use. ## Install pip install cld3-py uv add cld3-py poetry add cld3-py ## Installing cld3-py Before you install: Medium install friction due to compiled C++ bindings, but prebuilt wheels are available for Python 3.10, 3.11, 3.12, 3.13, 3.14 across macOS (Intel and ARM), Linux (manylinux and musllinux), and Windows. Active maintenance with recent releases. License in practice: Apache License permissive license allows commercial and private use with minimal restrictions; attribution required but no copyleft obligations. Quickstart: pip install cld3-py import gcld3 detector = gcld3.NNetLanguageIdentifier(min_num_bytes=0, max_num_bytes=1000) result = detector.FindLanguage(text="This text is written in English.") print(result.language, result.probability, result.is_reliable) Verify before relying: - Actual accuracy and reliability metrics on real-world multilingual corpora - Performance characteristics (latency, memory footprint) for typical use cases - Whether the package handles mixed-script or code-switched text reliably - Total number of supported languages and script variants ## Package facts - License: Copyright 2016 Google Inc. All rights reserved. Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions.… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 93.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags language detection, language identification, detect text language, nlp language classifier, cld3 python bindings, multilingual text detection, language recognition, language-detection, neural-network, nlp [View on SkillFed](https://skillfed.io/packages/cld3-py) · [View on PyPI](https://pypi.org/project/cld3-py/)