cld2: Google's Compact Language Detector 2

Bindings to Google's C++ library Compact Language Detector 2 (see <> for more information). Probabilistically detects over 80 languages in plain text or HTML. For mixed-language input it returns the top three detected languages and their approximate proportion of the total classified text bytes (e.g. 80% English and 20% French out of 1000 bytes). There is also a 'cld3' package on CRAN which uses a neural network model instead.

Version: 1.2.4
Imports: Rcpp
LinkingTo: Rcpp
Suggests: testthat, readtext, cld3
Published: 2022-10-26
DOI: 10.32614/CRAN.package.cld2
Author: Jeroen Ooms ORCID iD [aut, cre], Dirk Sites [cph] (Author of CLD2 C++ library)
Maintainer: Jeroen Ooms <jeroen at>
License: Apache License 2.0
URL: (docs) (devel) (upstream)
NeedsCompilation: yes
Materials: NEWS
CRAN checks: cld2 results


Reference manual: cld2.pdf


Package source: cld2_1.2.4.tar.gz
Windows binaries: r-devel:, r-release:, r-oldrel:
macOS binaries: r-release (arm64): cld2_1.2.4.tgz, r-oldrel (arm64): cld2_1.2.4.tgz, r-release (x86_64): cld2_1.2.4.tgz, r-oldrel (x86_64): cld2_1.2.4.tgz
Old sources: cld2 archive

Reverse dependencies:

Reverse imports: labourR
Reverse suggests: bdpar, cld3, emayili, googleLanguageR, morestopwords


Please use the canonical form to link to this page.