All Projects → vbauer → yandex-translate-api

vbauer / yandex-translate-api

Licence: MIT license
A simple REST client library for Yandex.Translate

Programming Languages

java
68154 projects - #9 most used programming language
groovy
2714 projects
shell
77523 projects

Projects that are alternatives of or similar to yandex-translate-api

TgTranslator
Telegram bot that removes language barrier between people in groups
Stars: ✭ 32 (+10.34%)
Mutual labels:  yandex, translation, yandex-translate
whats
🌐 a terminal translation tool
Stars: ✭ 16 (-44.83%)
Mutual labels:  translation, translations-api
Dynamictranslator
Instant translation application for windows in .NET 🎪
Stars: ✭ 131 (+351.72%)
Mutual labels:  yandex, translation
Deep Translator
A flexible free and unlimited python tool to translate between different languages in a simple way using multiple translators.
Stars: ✭ 233 (+703.45%)
Mutual labels:  yandex, translation
Translators
🌏🌍🌎Translators🌎🌍🌏 is a library which aims to bring free, multiple, enjoyable translation to individuals and students in Python. Translators是一个旨在用Python为个人和学生带来免费、多样、愉快翻译的库。
Stars: ✭ 295 (+917.24%)
Mutual labels:  yandex, translation
translate
A module grouping multiple translation APIs
Stars: ✭ 321 (+1006.9%)
Mutual labels:  yandex, yandex-translate
netty-in-action-cn
Netty In Action 中文版
Stars: ✭ 1,389 (+4689.66%)
Mutual labels:  translation
EverTranslator
Translate text anytime and everywhere, even you are gaming!
Stars: ✭ 59 (+103.45%)
Mutual labels:  translation
mobx-react-intl
A connector between mobx-react and react-intl
Stars: ✭ 32 (+10.34%)
Mutual labels:  translation
YandexAlgorithms
Lecture notes, Code with comments.
Stars: ✭ 30 (+3.45%)
Mutual labels:  yandex
HPO-translations
Internationalisation of the HPO content
Stars: ✭ 19 (-34.48%)
Mutual labels:  translation
Caiyun
Clean, only translation (Chrome/Firefox extension)
Stars: ✭ 222 (+665.52%)
Mutual labels:  translation
yandex-direct-api
PHP library for Yandex.Direct API v5 (abandoned)
Stars: ✭ 12 (-58.62%)
Mutual labels:  yandex
twig-translation
A Twig Translation Extension
Stars: ✭ 15 (-48.28%)
Mutual labels:  translation
google translate diff
Google Translate API wrapper translates only changes between revisions of big texts
Stars: ✭ 51 (+75.86%)
Mutual labels:  translation
bn.reactjs.org
(Work in progress) React documentation website in Bengali
Stars: ✭ 60 (+106.9%)
Mutual labels:  translation
django-i18nfield
Store internationalized strings in Django models with full forms support
Stars: ✭ 32 (+10.34%)
Mutual labels:  translation
appmetrica-logsapi-loader
A tool for automatic data loading from AppMetrica LogsAPI into (local) ClickHouse
Stars: ✭ 18 (-37.93%)
Mutual labels:  yandex
fluent-vue
Internationalization plugin for Vue.js
Stars: ✭ 137 (+372.41%)
Mutual labels:  translation
textstat
Ruby gem to calculate statistics from text to determine readability, complexity and grade level of a particular corpus.
Stars: ✭ 25 (-13.79%)
Mutual labels:  translation

Yandex Translate API

License Codacy Badge Coverage Status Build Status

yandex-translate-api is a simple REST client library for Yandex.Translate. The API provides access to the Yandex online machine translation service. It supports more than 90 languages and can translate separate words or complete texts.

Online documentation: Javadoc

Prerequisites

The following actions are required to work with this library:

  • Install JDK 1.8
  • Get a free API key.

Setup

Gradle configuration:

repositories {
    maven {
        url "https://jitpack.io"
    }
}

dependencies {
    compile 'com.github.vbauer:yandex-translate-api:1.4.2'
}

Maven configuration:

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.vbauer</groupId>
    <artifactId>yandex-translate-api</artifactId>
    <version>1.4.2</version>
</dependency>

Usage

FYI:

The entry point of this library is YTranslateApi interface (and the corresponding implementation YTranslateApiImpl).

def key = "<your key>"
def api = new YTranslateApiImpl(key)

Using instance of this service you can work with the following features:

  • DetectionApi detects the language of the specified text.
  • LanguageApi returns a list of translation directions supported by the service.
  • TranslationApi allows to translate text from one language to another.

DetectionApi

The following example returns Language.EN:

def language = api.detectionApi().detect("Hello, World!")

LanguageApi

To retrieve all available languages without their names, use the following code snippet:

def languages = api.languageApi().all()

It is also possible to fetch names for each language, using ui parameter:

def languages = api.languageApi().all(Language.RU)

TranslationApi

The following code should translate Russian's "Как дела?" to some English variant ("How are you doing?" or something similar):

def translation = api.translationApi().translate(
    "Как дела?", Direction.of(Language.RU, Language.EN)
)

Source language could be also detected automatically (so you need to specify only target language):

def translation = api.translationApi().translate("Как дела?", Language.EN)

Thanks to

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].