Skip to contents

A function that extracts the top guess of the language of a piece of text.

Usage

detect_language(text)

Arguments

text

character any text string

Value

character estimate for language abbreviation

Details

Utilizes the stringi package encoding detector as the means to infer language.

Examples

detect_language(text = "buongiorno")
#> [1] "it"