R/get_glossary_entries.R
get_glossary_entries.Rd
get_glossary_entries
retrieves all term pairs from a specified glossary using the DeepL API Pro.
For a list of available glossaries, see list_glossaries
.
get_glossary_entries(glossary_id, auth_key)
A string specifying the unique ID of the glossary whose entries you want to retrieve.
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.
A tibble with two columns representing the source and target language terms. Column names are automatically inferred from the glossary's language pair.
Glossaries are custom dictionaries consisting of source-target term pairs. The DeepL API returns these entries as tab-separated values (TSV). This function parses and converts them into a tidy tibble for further analysis.
To use this function, you must obtain an authentication key by registering for a DeepL API Pro account at DeepL API Pro.
if (FALSE) { # \dontrun{
glossary_id <- "your-glossary-id"
entries <- get_glossary_entries(glossary_id)
} # }