Google transliteration API in Java Swing project

I am working on a transliteration project in Java Swing. He can access the Internet, but I can’t configure it. How do we do this? Do I need to load Google API libraries or just a function call?

Here are some useful transliteration links:

Google Transliterate API Developer's Guide

Google API Library for Java for download

(I think it has all the Google APIs: Translate, transliterate, search, etc.)

I spent a lot of time, but I could not find how to configure the transliteration API, even in SO.

+4
source share
1 answer

The transliteration API seems to be outdated and not included in the Java client, only in the JavaScript client.

The actual calls made by the JS library are quite simple and can be easily replicated from anywhere:

http://www.google.com/inputtools/request?ime=transliteration_en_ru&num=5&cp=0&cs=0&ie=utf-8&oe=utf-8&text=prosto 

I don’t know if this works with Google’s terms. This is probably true.

You can also try running the Ajax client in Rhino . You will need env-js , which provides a clean javascript DOM environment.

It is just disgusting to work!

+2
source

Source: https://habr.com/ru/post/1394683/


All Articles