Tuesday, October 30, 2007

A Google Translate API?

I got all excited today when my favorite podcasters, the Java Posse announced in episode #148 that Google had released an API for their translate service.

I've had my own implementation going on for several months now, and I was all ready to post that I was going to discontinue my Google Translate Scraper. Who wants to use a scraper when you've got a real robust interface, right?

Then I looked at the code, and there is no way this is an official Google API, because it's nothing more than a two class scraper that's far more immature than my own implementation.

A couple of key differences between this one and mine. MIne has some basic test coverage, this one doesn't. My implementation will throw a TranslationException if you try to send more data than Google will process (you can't just send them an arbitrary amount of text). My implementation includes a real XML parser so if Google radically changes their HTML structure I can can still parse it cleanly.

So for now I'll keep my project going, hopefully one day Google really will release an API for their translate service.

No comments:

Post a Comment