Type: Package
Title: R Interface to Yandex Translate API
Version: 1.0
Date: 2016-02-28
Author: Mukul Chaware[aut,cre]
Maintainer: Mukul Chaware <mukul.chaware13@gmail.com>
Description: 'Yandex Translate' (https://translate.yandex.com/) is a statistical machine translation system. The system translates separate words, complete texts, and webpages. This package can be used to detect language from text and to translate it to supported target language. For more info: https://tech.yandex.com/translate/doc/dg/concepts/About-docpage/ .
URL: https://github.com/mukul13/RYandexTranslate
License: MIT + file LICENSE
LazyData: TRUE
Imports: httr,RCurl,jsonlite
RoxygenNote: 5.0.1.9000
NeedsCompilation: no
Packaged: 2016-02-29 11:03:06 UTC; mukul
Repository: CRAN
Date/Publication: 2016-02-29 18:39:32

Detects the language of the specified text.

Description

Detects the language of the specified text.

Usage

detect_language(api_key, text = "")

Arguments

api_key

yandex API key

text

The text to detect the language for

Value

data frame giving detected language

Examples

## Not run: 
data=detect_language(api_key,text="how are you?")

## End(Not run)

Gets a list of translation directions supported by the service

Description

Gets a list of translation directions supported by the service

Usage

get_translation_direction(api_key, lang = "")

Arguments

api_key

yandex API key

lang

If set, the response contains explanations of language codes. Language names are output in the language corresponding to the code in this parameter.

Value

data frame giving supported translation direction

Examples

## Not run: 
data=get_translation_direction(api_key)

## End(Not run)

Translates text to the specified language

Description

Translates text to the specified language

Usage

translate(api_key, text = "", lang = "")

Arguments

api_key

yandex API key

text

The text to translate.The maximum size of the text being passed is 10000 characters.

lang

The translation direction.You can use any of the following ways to set it:As a pair of language codes separated by a hyphen ("from"-"to"). For example, en-ru indicates translating from English to Russian.As the final language code (for example, ru). In this case, the service tries to detect the source language automatically.

Value

data frame giving translated text

Examples

## Not run: 
data=translate(api_key,text="how are you?",lang="hi")

## End(Not run)