textra {textrar} | R Documentation |
Translate text using Transliteration Model
Description
This function translates text using a transliteration model.
Usage
textra(text, params, model = "transLM", from = "en", to = "ja")
Arguments
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. |
Value
The translated text.
Examples
## 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)
[Package textrar version 0.8.0 Index]