detect_language {aws.comprehend} | R Documentation |
Detect language in a source text
Description
Detect language(s) in a source text
Usage
detect_language(text, ...)
Arguments
text |
A character string containing a textual source, or a character vector to detect languages separately for each element. |
... |
Additional arguments passed to |
Value
A data frame of language probabilities.
Examples
## Not run:
# simple example
detect_language("This is a test sentence in English")
# two languages in a single text
txt <- "A: ¡Hola! ¿Como está, usted?\nB: Ça va bien. Merci. Et toi?"
detect_language(txt)
# "batch" mode
detect_language(c("A: ¡Hola! ¿Como está, usted?",
"B: Ça va bien. Merci. Et toi?"))
## End(Not run)
[Package aws.comprehend version 0.2.1 Index]