View source: R/text_preprocessing.R
detect_lang | R Documentation |
This function attempts to detect the language of a text string. It implements a simple n-gram based approach that doesn't require additional packages.
detect_lang(text, sample_size = 1000)
text |
Text string to analyze |
sample_size |
Maximum number of characters to sample for language detection |
Character string containing the ISO 639-1 language code
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.