detect_lang: Detect language of text
Description
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.
Usage
detect_lang(text, sample_size = 1000)
Value
Character string containing the ISO 639-1 language code
Arguments
- text
Text string to analyze
- sample_size
Maximum number of characters to sample for language detection