Description Usage Arguments Value See Also
Translates text from Arabic, French, Portuguese or Spanish to English. Requires basic authentication using username and password.
1 2 | text_translate(text, userpwd, keep_data = "true", callback = NULL,
model_id = "es-en-conversational", accept = "application/json")
|
text |
Character vector. |
userpwd |
Character scalar that contains 'username:password' string. |
keep_data |
Character scalar specifying whether to share your data with Watson services for the purpose of training their models. |
callback |
Function that can be applied to responses to examine http status, headers, and content, to debug or to write a custom parser for content. The default callback parses content into a data.frame while dropping other response values to make the output easily passable to tidyverse packages like dplyr or ggplot2. For further details or debugging one can pass a fail or a more compicated function. |
model_id |
Character scalar formated as 'source-target-domain'. Source language (Arabic, Brazilian Portuguese, English, French, Italian, or Spanish), target language (Arabic, Brazilian Portuguese, English, French, Italian, or Spanish) and domain of text (conversational, news, patent). Check IBM documentation for other language mappings. |
accept |
Character scalar that specifies response format. Alternative is text/plain. |
Data.frame containing parsed content in a tidy fashion.
Check http://www.ibm.com/watson/developercloud/language-translation.html for further documentation, and https://language-translator-demo.mybluemix.net/ for a web demo.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.