The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Type: Package
Title: Client for 'AWS Translate'
Version: 0.1.4
Date: 2020-03-10
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.
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
URL: https://github.com/cloudyr/aws.translate
BugReports: https://github.com/cloudyr/aws.translate/issues
Imports: httr, jsonlite, aws.signature (≥ 0.3.4)
Encoding: UTF-8
RoxygenNote: 7.0.2
NeedsCompilation: no
Packaged: 2020-03-11 14:54:15 UTC; asac
Author: Thomas J. Leeper ORCID iD [aut], Antoine Sachet [cre]
Maintainer: Antoine Sachet <antoine.sac@gmail.com>
Repository: CRAN
Date/Publication: 2020-03-11 15:50:02 UTC

aws.translate

Description

Client for AWS Translate

Details

This is a client for AWS Translate, a machine translation service.

Author(s)

Thomas J. Leeper <thosjleeper@gmail.com>

See Also

AWS Translate Documentation

translate


Translate text between languages

Description

Translate text between languages

Usage

translate(text, from = "en", to, ...)

Arguments

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 translateHTTP.

Value

A character string containing the translation.

Examples

## Not run: 
  translate("hello world!", to = "fr")

## End(Not run)

Execute AWS Translate API Request

Description

This is the workhorse function to execute calls to the Translate API.

Usage

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,
  ...
)

Arguments

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 options("verbose").

region

A character string specifying an AWS region. See locate_credentials.

key

A character string specifying an AWS Access Key. See locate_credentials.

secret

A character string specifying an AWS Secret Key. See locate_credentials.

session_token

Optionally, a character string specifying an AWS temporary Session Token to use in signing a request. See locate_credentials.

...

Additional arguments passed to GET.

Details

This function constructs and signs an Translate API request and returns the results thereof, or relevant debugging information in the case of error.

Value

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.

Author(s)

Thomas J. Leeper

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.