detect_lang {LBDiscover}R Documentation

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)

Arguments

text

Text string to analyze

sample_size

Maximum number of characters to sample for language detection

Value

Character string containing the ISO 639-1 language code


[Package LBDiscover version 0.1.0 Index]