Categories

Calendar

September 2018
M T W T F S S
« Jun    
 12
3456789
10111213141516
17181920212223
24252627282930

Play Babelize with Google Translate

whisperHave you played such a game when you were young? One person think a sentence and tell another in a whisper (or just use gesture language or anything that might loss some information when transmitting the bits). Then sentence is passed along in that way until the last one. Then he tell us what he got finally — that is usually far from what the first person thought, and this is the funny part of this game. We can also ask all the people to tell what he got to monitor how the sentence changed piece by piece during the process.

So here’s a similar game. Except that now Google Translate is playing the game and we are watching. You submit a sentence (in whatever language Google Translate supports) and tell it to translate into another language, and then another, and then another, and finally back to the original language. Will it still be the same to the original sentence? May be or not. And how about iterate the process for several times? Just try it yourself.

I first come up with the idea of playing with Google Translate when I read the document of NLTK yesterday. I found that its machine translation section has a funny example of showing the build-in babelizer engine:

>>> babelize_shell()
NLTK Babelizer: type 'help' for a list of commands.
Babel> how long before the next flight to Alice Springs?
Babel> german
Babel> run
0> how long before the next flight to Alice Springs?
1> wie lang vor dem folgenden Flug zu Alice Springs?
2> how long before the following flight to Alice jump?
3> wie lang vor dem folgenden Flug zu Alice springen Sie?
4> how long before the following flight to Alice do you jump?
5> wie lang, bevor der folgende Flug zu Alice tun, Sie springen?
6> how long, before the following flight to Alice does, do you jump?
7> wie lang bevor der folgende Flug zu Alice tut, tun Sie springen?
8> how long before the following flight to Alice does, do you jump?
9> wie lang, bevor der folgende Flug zu Alice tut, tun Sie springen?
10> how long, before the following flight does to Alice, do do you jump?
11> wie lang bevor der folgende Flug zu Alice tut, Sie tun Sprung?
12> how long before the following flight does leap to Alice, does you?

The example translate the sentence “how long before the next flight to Alice Springs?” into German and then back into English. After 12 (or 6) iterations, the meaning is totally different from the original one. I think it is funny and decide to play with Google Translate.

Google Translate has an AJAX api that can be used to easily translate a piece of text. I wrote a small script to babelize with it. However, Google Translate is much more advanced than the babelizer of NLTK. The above sentence is identical to the origin when translated into German and back. But since Google Translate support many more language translation pairs, we can do some more funny things, like making a long chain of translating pairs. Do you have any good idea to fool Google Translate? Try it here. :D

Please do not do evil things, all requests are from the client by Javascript AJAX calls. Maybe Google might ban your IP address for a while or ask you to enter some CAPTCHA before going on if you make too many requests in a short time. I’m not sure.

BTW: If you are interested in the implementation. It is created with Google App Engine. And the web interface is powered with the jQuery Javascript library. The source code is available from the gitorious. I wish you enjoy it. :)

4 comments to Play Babelize with Google Translate

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>