Archive for the 'google' Category

Automatic blog posts translation into many languages with Altavista’s Babelfish engine

I think everybody will agree with me that a blog translated into many different languages may attract a bit more visitors and traffic. The idea of such translation isn’t new, I’ve seen this somewhere over Internet (sorry, but I don’t remember where) and I’m sure it makes sense. In this post I’d like to share my observation regarding popular web page translation engine Babelfish

There are many posts in my blog which aren’t translated yet and it would take much time to make them translated in case I do it manually (go to babelfish’s site, copy/paste post’s contents, choose proper translation direction and etc.). That’s why I prefer automatic page translation which is done for me while I have cup of cofee, have sex or whatever instead of sitting in front of blue screen of the monitor and copying/pasting text into babelfish’s textareas.

All what we need is Linux or Unix distribution (Ubuntu rocks for me) and ‘wget’ utility which usually comes with any Linux, Unix distributions. The idea lies in downloading links to the posts from rss feed of the blog. I’ve chosen blogger service by google and that’s why my rss feed can be foud here. Any other blog engines provides feeds, I’m sure.

So, create shell script somewhere and make it be executable by commands:
echo “#!/bin/bash” > /tmp/auto_tr.sh
chmod +x /tmp/auto_tr.sh

My script looks as follows:

#!/bin/bash

\rm /tmp/tr_output -r
wget http://artiomix.blogspot.com/rss.xml -O /tmp/rss.xml
cat /tmp/rss.xml | sed “s/></>\n</g” | grep “<link>” | awk -F ‘<link>’ ‘{print$2}’ | awk -F ‘</link>’ ‘{print$1}’ | grep “2007” | while read link;do
mkdir /tmp/tr_output &> /dev/null
save=$(echo $link | awk -F ‘.html’ ‘{print$1}’ | awk -F ‘/’ ‘{print$6}’)
echo “Translating $save…”
mkdir /tmp/tr_output/$save
echo -e “nl\nfr\nde\nel\nit\nja\nko\npt\nru\nes” | while read lang;do
#echo $lang
wget “http://babelfish.altavista.com/babelfish/trurl_pagecontent?lp=en_$lang&url=$link&#8221; -U “Mozilla” –wait=10 -O /tmp/tr_output/$save/$save”.”$lang”.html”
sleep 600
done
done
\rm -f /tmp/rss.xml

This one downloads rss.xml file (don’t forget to change URL to rss feed), parses it and sends every post to Babelfish’s input, after translation script saves output to /tmp/tr_output directory, waits 10 minutes and proceeds with nex language. Translation is performed into 10 languages. 10 minutes waiting period is needed as babelfish may accuse your script as a bot and ban you.

After some time you’ll find pretty large amount of data in /tmp/tr_output which you can copy/paste to your blog seamlessly. I recommend not to publish these posts to main page and keep it only for googlebot 🙂

Good luck!

P.S. If anybody know how to perform automatic posts translation with “google translate” instead of babelfish, it would be very appreciated if you leave some comments regarding it. Thanks!

Advertisements

Google phone (GPhone) rumors

LinuxDevices.org:

“Google’s first mobile phone will run a Linux operating system on a Texas Instruments “Edge” chipset, and will likely ship to T-Mobile and Orange customers in the Spring of 2008, according to unconfirmed reports. “GPhone” call minutes and text messages reportedly will be funded by mobile advertising…

News of the so-called “GPhone” or “G-Phone” broke quietly about two weeks ago in the island nation of Singapore, where Jennifer Tan of Reuters subsidiary Anian Research filed a report on July 12.

Tan cited “industry sources,” “U.S. sources,” and “manufacturing and component supply chain sources” in backing her assertion that after year-long delays finding a manufacturer, Google contracted Taiwan-based smartphone maker High Tech Computer (HTC) to design its phone hardware. HTC is best-known for its Windows Mobile smartphones, however, and Tan offered no conjecture about who might supply the phone’s Linux-based operating system.

Additional details reported by Tan include:

* The G-Phone will have a large color screen with a predictive Qwerty keypad to simplify Google searching
* A follow-up 3G-capable model (Edge is considered “2.75G”) will use a Qualcomm chipset
* Scheduled for production in Q1 of 2006, the Google phone will hit retail shelves next spring
* Call minutes and text messages are to be funded by “mobile advertising”
* Google originally hoped to launch a phone this year, but was delayed by “difficulties in nailing down a deal with a handset maker”
* T-Mobile will carrier the phone in the U.S., along with (possibly) Orange in other markets

Tan quotes Susquehanna Financial Group analyst Marianne Wolk as having said, “A mobile offering would be consistent with Google’s goal to make search accessible. We believe Google would design a solution to facilitate greater use of Google Search and other applications like Google Talk, Gmail, Google Maps, encourage wireless video, and leverage this usage to hasten the market for mobile advertising.”

Google itself has declined to comment on rumors it plans to produce a phone, Tan reported.”

Tag/Label cloud for blogger/blogspot howto

Here is very useful article about how to create tag cloud or label cloud at blogger (blogspot).

Google calendar and Linux Evolution sync

As we know Evolution is a default mail client program of Gnome Desktop manager. Here is a good article about how to sync Google Calendar with Evolution one.


Archive