Skip to content

cld2

1.2.6

Google's Compact Language Detector 2

1packages dependsuggested by 6
21.1Kdownloads / year
35.0%test coverage
13/13flavors OK

Overview

About

Bindings to Google's C++ library Compact Language Detector 2 (see https://github.com/cld2owners/cld2#readme 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.

Install

Health

CRAN checks
13OK
Slowest check: 2.9 min · r-devel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-07-30
  • NOTE12 OK, 1 NOTE2026-07-29
  • OK14 OK2026-04-22
Show 2 earlier changesHide 2 earlier changes
  • ERROR13 OK, 1 ERROR2026-04-18
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.2.6
README· In the repository, left out of the releaseVignettesNoNEWSYes · 100% structuredCitation fileNoWebsiteYes · pkgdown
Help pages
1
Examples that run
100%1 run in a plain check
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
0%
Help pages citing references
0%

Downloads

21.1K
CRAN downloads in the past year
Rank #3,605 · ~58/day · ~1.8K/mo
Daily download trend is not available in this view yet.
1.2K30 days
2.8K90 days
21.1K1 year
Compare downloads with other packages →
Also on404 r2u10 autocran

Repository

39Stars
7Forks
5Open issues
2Open PRs
2Releases
60Commits
4Commit identities
cldcld2language-detectionlanguage-detectorrrstatsr-package
60 commits · Last activity 2025-07-02 · 0% stars, 30d
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
1
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2024-11-02 · 382026-07-07 · 39
PracticesBeta

4 development-tooling and community-health practices detected across 3 families in the upstream repository

Checks run against github.com/ropensci/cld2 on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (1)
Code of conduct (inherited from ropensci)
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
5 external dependencies (excludes base and recommended)

Installing cld2 adds 1 package (1 with compiled code, 1.8 MB of source tarballs). Heaviest: Rcpp 1.8 MB.

Depends (0)
none
Imports (1)
LinkingTo (1)
Enhances (0)
none
Reverse dependencies
1direct
0indirect
Imports 1
Suggested by 6
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (2)
Author, Maintainer since 1.0 (2017)
Copyright holder
Author of CLD2 C++ library
Releases (9)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • 1.2.6Latest
    record
    2025-03-22 · current release · diff ↗
  • 1.2.5
    record
    2024-10-04 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • 1.2.4
    record
    2022-10-27 · diff ↗
  • 1.2.3
    record
    2022-10-02 · diff ↗
  • 1.2.2
    record
    2022-09-25 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • 1.2.1
    record
    2020-12-15 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • 1.2
    record
    2018-05-11 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
Show 3 earlier eventsHide 3 earlier events
  • 1.1
    record
    2017-06-10 · diff ↗ ·
    removed 1 export
    detect_language_multi
    added 1 export
    detect_language_mixed
  • 1.0
    record
    2017-06-03
  • R
    R 3.4.0 released · 2017-04-21

Package metadata

First published
2017-06-03
Total releases
9 / 9 yrs
License
Apache License 2.0 OSI
Download size
3.5 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("cld2")
Ooms, J., & Dirk Sites. (2025). cld2: Google's Compact Language Detector 2 (Version 1.2.6) [Computer software]. https://doi.org/10.32614/CRAN.package.cld2

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for cld2 version 1.2.6 [Data set]. HJJB, LLC. Data release v2026-10-17. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-17, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy