# NOT RUN {
# Vectorized function
text <- c("To be or not to be?", "Ce n'est pas grave.", "Nou breekt mijn klomp!")
detect_language(text)
# }
# NOT RUN {
# Read HTML from connection
detect_language(url('http://www.un.org/ar/universal-declaration-human-rights/'), plain_text = FALSE)
# More detailed classification output
detect_language_mixed(
url('http://www.un.org/fr/universal-declaration-human-rights/'), plain_text = FALSE)
detect_language_mixed(
url('http://www.un.org/zh/universal-declaration-human-rights/'), plain_text = FALSE)
# }
Run the code above in your browser using DataCamp Workspace