get_glossary_entries2: Retrieve Glossary Entries with the DeepL API Free

View source: R/get_glossary_entries2.R

get_glossary_entries2R Documentation

Retrieve Glossary Entries with the DeepL API Free

Description

get_glossary_entries2 retrieves all term pairs from a specified glossary using the DeepL API Free. For a list of available glossaries, see list_glossaries2.

Usage

get_glossary_entries2(glossary_id, auth_key)

Arguments

glossary_id

A string specifying the unique ID of the glossary whose entries you want to retrieve.

auth_key

A string representing the authentication key for the DeepL API Free. 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.

Details

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 Free account at DeepL API Free.

Value

A tibble with two columns representing the source and target language terms. Column names are automatically inferred from the glossary's language pair.

References

DeepL API Documentation — Get Glossary Entries

Examples

## Not run: 
glossary_id <- "your-glossary-id"
entries <- get_glossary_entries2(glossary_id)

## End(Not run)


deeplr documentation built on June 8, 2025, 12:47 p.m.