textra {textrar} | R Documentation |
This function translates text using a transliteration model.
textra(text, params, model = "transLM", from = "en", to = "ja")
text |
The text to be translated. |
params |
A list of parameters to be passed to the API. |
model |
The model to be used for translation. |
from |
The source language. |
to |
The target language. |
The translated text.
## Not run:
text <- "Hello world"
key <- "abcdefghijklmnopqrstuvw01234567890abcdef1" # API key
secret <- "xyzabcdefghijklmnopqrstuvw012345" # API secret
name <- "login_ID" # login_ID
params <- gen_params(key = key, secret = secret, name = name)
translated <-
textra(text, params, model = "transLM", from = "en", to = "ja")
translated
## End(Not run)