Google's Compact Language Detector 2

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.


News

1.1

  • detect_language() is now vectorized
  • detect_language() now returns codes by default to be compatible with 'cld3'
  • detect_language_multi() has been renamed to detect_language_mixed()

1.0

  • Initial CRAN release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("cld2")

1.2 by Jeroen Ooms, 5 months ago


https://github.com/ropensci/cld2 (devel) https://github.com/cld2owners/cld2 (upstream)


Browse source code at https://github.com/cran/cld2


Authors: Jeroen Ooms [aut, cre] , Dirk Sites [cph] (Author of CLD2 C++ library)


Documentation:   PDF Manual  


Apache License 2.0 license


Imports Rcpp

Suggests testthat, readtext, cld3

Linking to Rcpp


Suggested by cld3, googleLanguageR.


See at CRAN