Title: | Interface to the 'DeepL' Translation API |
---|---|
Description: | A wrapper for the 'DeepL' Pro API <https://www.deepl.com/docs-api>, a web service for translating texts between different languages. A DeepL API developer account is required to use the service (see <https://www.deepl.com/pro#developer>). |
Authors: | David Zumbach [aut, cre], Paul C. Bauer [aut] |
Maintainer: | David Zumbach <[email protected]> |
License: | MIT + file LICENSE |
Version: | 2.0.1 |
Built: | 2025-02-16 05:31:20 UTC |
Source: | https://github.com/zumbov2/deeplr |
deeplr
packageAn R wrapper for the DeepL Translator API
See the README on GitHub
Maintainer: David Zumbach [email protected]
Authors:
Paul C. Bauer [email protected]
Useful links:
available_languages
list all supported languages of DeepL API Pro.
available_languages(auth_key = "your_key")
available_languages(auth_key = "your_key")
auth_key |
authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
## Not run: available_languages(auth_key = "my_key") ## End(Not run)
## Not run: available_languages(auth_key = "my_key") ## End(Not run)
available_languages2
list all supported languages of DeepL API Free.
available_languages2(auth_key = "your_key")
available_languages2(auth_key = "your_key")
auth_key |
authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
## Not run: available_languages2(auth_key = "my_key") ## End(Not run)
## Not run: available_languages2(auth_key = "my_key") ## End(Not run)
deeplr
packageAn R wrapper for the DeepL Translator API
See the README on GitHub
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.
detect(text, auth_key = "your_key")
detect(text, auth_key = "your_key")
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. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
## Not run: detect("My name is Hans.", auth_key = "my_key") ## End(Not run)
## Not run: detect("My name is Hans.", auth_key = "my_key") ## End(Not run)
detect2
guesses the language of a text using DeepL API Free.
Use available_languages
to list all supported languages. An authentication key
is required to use this service. With the DeepL API Free package, developers can translate
up to 500,000 characters per month for free.
detect2(text, auth_key = "your_key")
detect2(text, auth_key = "your_key")
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. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
## Not run: detect2("My name is Hans.", auth_key = "my_key") ## End(Not run)
## Not run: detect2("My name is Hans.", auth_key = "my_key") ## End(Not run)
pimp
translates a text into a support language and back into the original language
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.
pimp(text, source_lang, help_lang, auth_key = "your_key")
pimp(text, source_lang, help_lang, auth_key = "your_key")
text |
character vector with texts to be improved. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be improved. If input is of length 1, the same source language is applied to all elements. |
help_lang |
language used as a help language for reverse translation. |
auth_key |
authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
## Not run: pimp("In former times I lived in Zurich", source_lang = "EN", help_lang = "DE", auth_key = "my_key") ## End(Not run)
## Not run: pimp("In former times I lived in Zurich", source_lang = "EN", help_lang = "DE", auth_key = "my_key") ## End(Not run)
pimp2
translates a text into a support language and back into the original language
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
pimp2(text, source_lang, help_lang, auth_key = "your_key")
pimp2(text, source_lang, help_lang, auth_key = "your_key")
text |
character vector with texts to be improved. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be improved. If input is of length 1, the same source language is applied to all elements. |
help_lang |
language used as a help language for reverse translation. |
auth_key |
authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
## Not run: pimp2( text = "In former times I lived in Zurich", source_lang = "EN", help_lang = "DE", auth_key = "my_key" ) ## End(Not run)
## Not run: pimp2( text = "In former times I lived in Zurich", source_lang = "EN", help_lang = "DE", auth_key = "my_key" ) ## End(Not run)
split_text
splits texts into blocks of a maximum number of bytes.
split_text(text, max_size_bytes = 29000, tokenize = "sentences")
split_text(text, max_size_bytes = 29000, tokenize = "sentences")
text |
character vector to be split. |
max_size_bytes |
maximum size of a single text segment in bytes. |
tokenize |
level of tokenization. Either "sentences" or "words". |
The function uses tokenizers::tokenize_sentences
to split texts.
Returns a (tibble
) with the following columns:
text_id
position of the text in the character vector.
segment_id
ID of a text segment.
segment_text
text segment that is smaller than max_size_bytes
## Not run: # Split long text text <- paste0(rep("This is a very long text.", 10000), collapse = " ") split_text(text) ## End(Not run)
## Not run: # Split long text text <- paste0(rep("This is a very long text.", 10000), collapse = " ") split_text(text) ## End(Not run)
toChinese
translates a text from an available language into Chinese
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.
toChinese( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toChinese( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toChinese("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toChinese(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toChinese("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toChinese(texts, get_detect = T, auth_key = "x") ## End(Not run)
toChinese2
translates a text from an available language into Chinese
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toChinese2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toChinese2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toChinese2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toChinese2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toChinese2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toChinese2(texts, get_detect = T, auth_key = "x") ## End(Not run)
toEnglish
translates a text from an available language into English
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.
toEnglish( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toEnglish( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toEnglish("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toEnglish(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toEnglish("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toEnglish(texts, get_detect = T, auth_key = "x") ## End(Not run)
toEnglish2
translates a text from an available language into English
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toEnglish2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toEnglish2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toEnglish2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toEnglish2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toEnglish2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toEnglish2(texts, get_detect = T, auth_key = "x") ## End(Not run)
toFrench
translates a text from an available language into French
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.
toFrench( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toFrench( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toFrench("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "I'm a doctor.", "Ich komme aus der Schweiz.") toFrench(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toFrench("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "I'm a doctor.", "Ich komme aus der Schweiz.") toFrench(texts, get_detect = T, auth_key = "x") ## End(Not run)
toFrench2
translates a text from an available language into French
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toFrench2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toFrench2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toFrench2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "I'm a doctor.", "Ich komme aus der Schweiz.") toFrench2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toFrench2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "I'm a doctor.", "Ich komme aus der Schweiz.") toFrench2(texts, get_detect = T, auth_key = "x") ## End(Not run)
toGerman
translates a text from an available language into German
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.
toGerman( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toGerman( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toGerman("Hello world!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "I'm from Brisbane.") toGerman(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toGerman("Hello world!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "I'm from Brisbane.") toGerman(texts, get_detect = T, auth_key = "x") ## End(Not run)
toGerman2
translates a text from an available language into German
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toGerman2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toGerman2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toGerman2("Hello world!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "I'm from Brisbane.") toGerman2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toGerman2("Hello world!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "I'm from Brisbane.") toGerman2(texts, get_detect = T, auth_key = "x") ## End(Not run)
toItalian
translates a text from an available language into Italian
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.
toItalian( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toItalian( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toItalian("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toItalian(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toItalian("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toItalian(texts, get_detect = T, auth_key = "x") ## End(Not run)
toItalian2
translates a text from an available language into Italian
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toItalian2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toItalian2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toItalian2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toItalian2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toItalian2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("Me llamo Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toItalian2(texts, get_detect = T, auth_key = "x") ## End(Not run)
toJapanese
translates a text from an available language into Japanese
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.
toJapanese( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toJapanese( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toJapanese("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toJapanese(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toJapanese("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toJapanese(texts, get_detect = T, auth_key = "x") ## End(Not run)
toJapanese2
translates a text from an available language into Japanese
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toJapanese2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toJapanese2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toJapanese2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toJapanese2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toJapanese2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toJapanese2(texts, get_detect = T, auth_key = "x") ## End(Not run)
toPortuguese
translates a text from an available language into Portuguese
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.
toPortuguese( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toPortuguese( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toPortuguese("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toPortuguese(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toPortuguese("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toPortuguese(texts, get_detect = T, auth_key = "x") ## End(Not run)
toPortuguese2
translates a text from an available language into Portuguese
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toPortuguese2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toPortuguese2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toPortuguese2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toPortuguese2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toPortuguese2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toPortuguese2(texts, get_detect = T, auth_key = "x") ## End(Not run)
toRussian
translates a text from an available language into Russian
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.
toRussian( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toRussian( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toRussian("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toRussian(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toRussian("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toRussian(texts, get_detect = T, auth_key = "x") ## End(Not run)
toRussian2
translates a text from an available language into Russian
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toRussian2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toRussian2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toRussian2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toRussian2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toRussian2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toRussian2(texts, get_detect = T, auth_key = "x") ## End(Not run)
toSpanish
translates a text from an available language into Spanish
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.
toSpanish( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toSpanish( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toSpanish("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toSpanish(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toSpanish("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toSpanish(texts, get_detect = T, auth_key = "x") ## End(Not run)
toSpanish2
translates a text from an available language into Spanish
using DeepL API Free. Use available_languages2
to list all supported languages.
An authentication key is required to use this service. With the DeepL API Free package,
developers can translate up to 500,000 characters per month for free.
toSpanish2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
toSpanish2( text, source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text toSpanish2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toSpanish2(texts, get_detect = T, auth_key = "x") ## End(Not run)
## Not run: # Translate a single text toSpanish2("Hallo Welt!", auth_key = "my_key") # Translate multiple texts and return the detected language texts <- c("My name is Fred.", "Je suis médecin.", "Ich komme aus der Schweiz.") toSpanish2(texts, get_detect = T, auth_key = "x") ## End(Not run)
translate
translates texts between different languages 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.
translate( text, target_lang = "EN", source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
translate( text, target_lang = "EN", source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
target_lang |
target language of the translation. If input is of length 1, all elements are translated into the same language. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text translate("I like to translate texts.", target_lang = "DE", auth_key = "x") # Translate multiple texts into one target language texts <- c("I like to translate texts.", "Ich übersetze gerne Texte.") translate(texts, target_lang = "FR", auth_key = "x") # Translate a single text into multiple target languages translate("I like to translate texts.", target_lang = c("FR", "DE", "IT"), auth_key = "x") # Translate multiple texts into different languages texts <- c("I like to translate texts.", "Ich übersetze gerne Texte.") translate(texts, target_lang = c("FR", "IT"), auth_key = "x") ## End(Not run)
## Not run: # Translate a single text translate("I like to translate texts.", target_lang = "DE", auth_key = "x") # Translate multiple texts into one target language texts <- c("I like to translate texts.", "Ich übersetze gerne Texte.") translate(texts, target_lang = "FR", auth_key = "x") # Translate a single text into multiple target languages translate("I like to translate texts.", target_lang = c("FR", "DE", "IT"), auth_key = "x") # Translate multiple texts into different languages texts <- c("I like to translate texts.", "Ich übersetze gerne Texte.") translate(texts, target_lang = c("FR", "IT"), auth_key = "x") ## End(Not run)
translate2
translates texts between different languages using DeepL API Free.
Use available_languages2
to list all supported languages. An authentication key
is required to use this service. With the DeepL API Free package, developers can translate
up to 500,000 characters per month for free.
translate2( text, target_lang = "EN", source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
translate2( text, target_lang = "EN", source_lang = NULL, split_sentences = TRUE, preserve_formatting = FALSE, get_detect = FALSE, auth_key = "your_key" )
text |
character vector to be translated. Only UTF8-encoded plain text is supported. An element can contain several sentences, but should not exceed 30kbytes. |
target_lang |
target language of the translation. If input is of length 1, all elements are translated into the same language. |
source_lang |
language of the text to be translated. If parameter |
split_sentences |
if |
preserve_formatting |
if |
get_detect |
if |
auth_key |
Authentication key. |
To get an authentication key, you need to register for a DeepL API Free account (https://www.deepl.com/pro#developer).
If get_detect
is set to FALSE
a character vector
containing the
translation is returned. Otherwise, a (tibble
) is returned with the following columns:
translation
the translated text.
source_lang
detected or specified language of the input text.
## Not run: # Translate a single text translate2("I like to translate texts.", target_lang = "DE", auth_key = "x") # Translate multiple texts into one target language texts <- c("I like to translate texts.", "Ich übersetze gerne Texte.") translate2(texts, target_lang = "FR", auth_key = "x") # Translate a single text into multiple target languages translate2("I like to translate texts.", target_lang = c("FR", "DE", "IT"), auth_key = "x") # Translate multiple texts into different languages texts <- c("I like to translate texts.", "Ich übersetze gerne Texte.") translate2(texts, target_lang = c("FR", "IT"), auth_key = "x") ## End(Not run)
## Not run: # Translate a single text translate2("I like to translate texts.", target_lang = "DE", auth_key = "x") # Translate multiple texts into one target language texts <- c("I like to translate texts.", "Ich übersetze gerne Texte.") translate2(texts, target_lang = "FR", auth_key = "x") # Translate a single text into multiple target languages translate2("I like to translate texts.", target_lang = c("FR", "DE", "IT"), auth_key = "x") # Translate multiple texts into different languages texts <- c("I like to translate texts.", "Ich übersetze gerne Texte.") translate2(texts, target_lang = c("FR", "IT"), auth_key = "x") ## End(Not run)
usage
returns the character usage and the configured limit for the current period of
a DeepL API Pro account.
usage(auth_key = "your_key")
usage(auth_key = "your_key")
auth_key |
authentication key of the corresponding DeepL API Pro account. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
## Not run: usage(auth_key = "my_key") ## End(Not run)
## Not run: usage(auth_key = "my_key") ## End(Not run)
usage2
returns the character usage and the configured limit for the current period of
a DeepL API Free account.
usage2(auth_key = "your_key")
usage2(auth_key = "your_key")
auth_key |
authentication key. |
To get an authentication key, you need to register for a DeepL API Pro account (https://www.deepl.com/pro#developer).
## Not run: usage(auth_key = "my_key") ## End(Not run)
## Not run: usage(auth_key = "my_key") ## End(Not run)