Title: | Client for 'AWS Translate' |
---|---|
Description: | A client for 'AWS Translate' <https://aws.amazon.com/documentation/translate>, a machine translation service that will convert a text input in one language into a text output in another language. |
Authors: | Thomas J. Leeper [aut] , Antoine Sachet [cre] |
Maintainer: | Antoine Sachet <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1.4.9000 |
Built: | 2024-11-22 02:49:43 UTC |
Source: | https://github.com/cloudyr/aws.translate |
Client for AWS Translate
This is a client for AWS Translate, a machine translation service.
Thomas J. Leeper <[email protected]>
Translate text between languages
translate(text, from = "en", to, ...)
translate(text, from = "en", to, ...)
text |
A character string containing a text |
from |
A two-letter language code specifying the language of the source text. |
to |
two-letter language code specifying the language to translate in to. |
... |
Additional arguments passed to |
A character string containing the translation.
## Not run: translate("hello world!", to = "fr") ## End(Not run)
## Not run: translate("hello world!", to = "fr") ## End(Not run)
This is the workhorse function to execute calls to the Translate API.
translateHTTP( action, query = list(), headers = list(), body = NULL, verbose = getOption("verbose", FALSE), region = Sys.getenv("AWS_DEFAULT_REGION", "us-east-1"), key = NULL, secret = NULL, session_token = NULL, ... )
translateHTTP( action, query = list(), headers = list(), body = NULL, verbose = getOption("verbose", FALSE), region = Sys.getenv("AWS_DEFAULT_REGION", "us-east-1"), key = NULL, secret = NULL, session_token = NULL, ... )
action |
A character string specifying the API action to take |
query |
An optional named list containing query string parameters and their character values. |
headers |
A list of headers to pass to the HTTP request. |
body |
A request body |
verbose |
A logical indicating whether to be verbose. Default is given by |
region |
A character string specifying an AWS region. See |
key |
A character string specifying an AWS Access Key. See |
secret |
A character string specifying an AWS Secret Key. See |
session_token |
Optionally, a character string specifying an AWS temporary Session Token to use in signing a request. See |
... |
Additional arguments passed to |
This function constructs and signs an Translate API request and returns the results thereof, or relevant debugging information in the case of error.
If successful, a named list. Otherwise, a data structure of class “aws-error” containing any error message(s) from AWS and information about the request attempt.
Thomas J. Leeper