Skip to content
R package to translate text using Yandex Translate API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.Rproj.user/1B64633E maintainer details added Feb 1, 2016
R R cmd check done Feb 28, 2016
man R cmd check done Feb 28, 2016
.Rbuildignore travis file added May 6, 2016
.travis.yml travis file added May 6, 2016
DESCRIPTION description updated Feb 29, 2016
LICENSE License file added Feb 28, 2016
NAMESPACE License file added Feb 28, 2016
README.md build logo added May 6, 2016
RYandexTranslate.Rproj R cmd check done Feb 28, 2016
tutorial.Rmd tutorial added Mar 9, 2016

README.md

RYandexTranslate

Travis-CI Build Status Downloads cran version

R package to translate text using Yandex Translate API.

##Installation

To install from CRAN repository:

install.packages("RYandexTranslate")

To install from github:

library(devtools)
install_github("mukul13/RYandexTranslate")

To get free API key, sign up here

##Examples

To list all functions supported by RYandexTranslate package

library(RYandexTranslate)
ls("package:RYandexTranslate")
#>"detect_language"   "get_translation_direction"   "translate"   

To get a list of translation directions supported by the service

api_key="YOUR API KEY"
directions=get_translation_direction(api_key)
head(directions)
#>"az-ru" "be-bg" "be-cs" "be-de" "be-en" "be-es"

To detect the language of the specified text

data=detect_language(api_key,text="how are you?")
data
#>"en"

To translate text to the specified language

data=translate(api_key,text="how are you?",lang="en-hi"  )
#>$lang
#>[1] "en-hi"
#>
#>$text
#>[1] "आप कैसे हैं?"

##Resources

You can’t perform that action at this time.