Yandex Translate API


Source link: https://github.com/vbauer/yandex-translate-api

Yandex Translate API

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

Resources

The simplest navigation library for Android.

Main Features:

  • Navigation is as simple as calling goTo(screen)
  • You get full control of the backstack
  • Transitions are automatically handled for you

Simple utility for handling Marker, Polyline and Polygon in Google Maps with multiple map style.

A slim & clean & typeable Adapter without VIEWHOLDER.

Features:

  • No ViewHolder any more
  • No Reflection
  • Fluent & simple API
  • Multi-typeable adapter
  • Support Kotlin
  • Support Simple DiffUtils

A camera view to capture long image merged from small captured images as it is in Shoparoo app!

This library uses CameraView from Google as the backbone of camera functionality and adds auto-support of creating long or wide images from multiple images.

Features:

  • Built-in Camera UI and activity
  • Built-in Image Viewer with pinch-fling gestures for zoom/move/rotate etc.
  • TouchImageView with gestures support for zoom/move/rotate etc.
  • Built-in permission handling for Camera and Storage
  • Horizontal or Vertical image merging

Android Runtime Permission is an easy way to handle single or multiple permission very easily.

In-App Android Debugging Tool With Enhanced Logging, Networking Info, Crash reporting And More.

The debugger tool for Android developer. Display logs, network request, while using the app. Easy accessible with its bubble head button :radio_button:. Easy to integrate in any apps, to handle development or testing apps easier. First version, there is plenty of room for improvement.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes