pimp: Fix and improve texts using DeepL API Pro

View source: R/pimp.R

pimpR Documentation

Fix and improve texts using DeepL API Pro

Description

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.

Usage

pimp(text, source_lang, help_lang, auth_key = "your_key")

Arguments

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.

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: 
pimp("In former times I lived in Zurich", source_lang = "EN", help_lang = "DE", auth_key = "my_key")

## End(Not run)


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