detect: Language detection using DeepL API Pro

View source: R/detect.R

detectR Documentation

Language detection using DeepL API Pro

Description

detect guesses the language of a text using DeepL API Pro. Use available_languages to list all supported languages. An authentication key is required to use this service. The service costs depending on the number of translated characters.

Usage

detect(text, auth_key = "your_key")

Arguments

text

character vector with texts to classify. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes.

auth_key

Authentication key.

Details

To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).

References

DeepL API documentations

Examples

## Not run: 
detect("My name is Hans.", auth_key = "my_key")

## End(Not run)


deeplr documentation built on Nov. 8, 2023, 1:09 a.m.