create_glossary
creates a glossary for a language pair using the DeepL API Pro.
create_glossary(
name,
source_lang,
target_lang,
entries_source_lang,
entries_target_lang,
return_tibble = F,
auth_key
)
A string specifying the name to be associated with the glossary.
A string specifying the source language code.
A string specifying the target language code.
A character vector containing the glossary entries in the source language.
A character vector containing the glossary entries in the target language.
Logical. If TRUE
, the returned result will be converted to a tibble.
A string representing the authentication key for the DeepL API Pro.
If not provided, the function will attempt to retrieve the key from the environment
variable DEEPL_API_KEY
. You can set this variable using
Sys.setenv(DEEPL_API_KEY = "your_key")
or define it in your .Renviron
file for persistent use.
To use this function, you must obtain an authentication key by registering for a DeepL API Pro account at DeepL API Pro. The function sends a request to create a glossary and returns the result in a structured format.