Install & Compatibility
Where this runs
tested against v0.22 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
py 3.10
✕ build_error
✕ build_error
py 3.11
✕ build_error
✕ build_error
py 3.12
✕ build_error
✕ build_error
py 3.13
✕ build_error
✕ build_error
py 3.9
✕ build_error
✓ 2.3s
59MB installed
● package 59MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
pycld3
✓ import pycld3
✗ import cld3
The package name on PyPI is pycld3, but the module is imported as pycld3. A common mistake is to import cld3 (which matches the Google library name).
Basic usage of pycld3 to detect language of a string and get top N languages.
import pycld3
# Detect language of a text
result = pycld3.classify('This is a test')
print(result) # LanguageResult(language='en', probability=0.9999, reliable=True)
# Get top N languages
results = pycld3.top_n('This is a test', 3)
print(results) # [LanguageResult(language='en', ...), ...]
# Language identification for multiple texts
for text in ['Bonjour', 'Hola', 'Hello']:
result = pycld3.classify(text)
print(f"{text} -> {result.language}")
Upgrade
Version history
0.22latest on PyPI · released Mar 9, 2021
Audit
Dependencies
No dependency data recorded yet.