[Ann] Google translate ruby client api 0.1

S

sishen

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

http://sishen.lifegoo.com/?p=51

Hi, guys. I wrote a ruby client api fro google translate service, then i can
get the answer directly from the terminal, instead of the browser.
It's really convenient for me. Enjoy it, :)

*Install*

sudo gem install rtranslate

*Usage*

sishen@lifegoo:~$ irb -rubygems
irb(main):001:0> require 'rtranslate'
=> true
irb(main):002:0> $KCODE = 'u'
=> "u"
irb(main):003:0> result = Translate.t("china", Language::ENGLISH,
Language::CHINESE_SIMPLIFIED)
=> "$BCf9q(B"
irb(main):004:0> result = Translate.t("china", Language::ENGLISH,
Language::JAPANESE)
=> "$BCf2Z?ML16&OB9q(B"
irb(main):005:0> result = Translate.t("china", Language::ENGLISH, "zh-TW")
=> "$BCfT"(B"

Really very easy to use, I think. And the source is hosting on
http://rtranslate.googlecode.com. Enjoy it.
 
S

sishen

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

a good idea. I'll do it tonight, :)
 
R

Richard Conroy

http://sishen.lifegoo.com/?p=51

Hi, guys. I wrote a ruby client api fro google translate service, then i can
get the answer directly from the terminal, instead of the browser.
It's really convenient for me. Enjoy it, :)

I have written similar tools using Watir, but one thing I noticed is that google
translate doesn't like you using bots - it hit me with a capcha.

Does this library handle this? Or is it just something that you are supposed
to use responsibly.

Admittedly I was being an ass about it, and trying to translate all of
my applications
resource files.

As an aside, does anyone know of any online services that allow you unlimited
(for pay) machine translation?
 
S

sishen

Note: parts of this message were removed by the gateway to make it a legal Usenet post.

sorry, personally i haven't met the problem. It has never asked me to input
the captcha to go through.
I think maybe your translation is too heavy and have automatically
recognized by the server.

Also, if you still meet the problem with rtranslate, please give me a
feedback and i'll try to fight with it. :)
 
R

Richard Conroy

sorry, personally i haven't met the problem. It has never asked me to input
the captcha to go through.
I think maybe your translation is too heavy and have automatically
recognized by the server.

Yeah, it was pretty brutal alright, some java properties files with
~3000 entries.
For Rtranslate, it might be best to have some kind of custom exception in case
you found it.
Also, if you still meet the problem with rtranslate, please give me a
feedback and i'll try to fight with it. :)

Lol! I would probably stay away from trying to work around
Captcha/Kismet/whatever.

I need google too much for work for them to pile on sanctions....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top