Archive for the ‘Bengali Computing’ Category

You may know that one cannot read Anandabazar Patrika (ABP) the largest Bengali newspaper from India, using any of the modern browsers such as Mozilla Firefox, Apple  Safari, Google Chrome, Opera, and others (only exception is Microsoft IE). This is because Anandabazar has failed to adopt the international standard for digital Bangla namely the Unicode even in 2010.

I am launching a petition site with a live Unicode proxy that demonstrates — Anandabazar Patrika can be read not only in all modern browsers but also in mobiles phones, if they care to adopt the international standard.

If you support this petition then let your voice be known.


Read Full Post »

If any scientific invention that has literally touched the lives of more than 4.6 billion people around the world then it is simply the mobile phoneIn India alone, there are now 600 million mobile phone users and it is growing at more than 15 million per month. Furthermore, the number of Indians accessing internet using mobile phone is growing much faster compared to those of desktops or laptops. With upcoming launch of 3G services by private operators, this number could grow even faster.

Mobile phone is also the most economical personal device for accessing internet in India. One can buy an internet-enabled handset almost at the same price of a high-end modem. As mobile phone penetrates the vast rural areas of the country, it also brings internet to the masses. Consequently, the need for local language websites is now greater than ever.

In the technological front, viewing Indian language webpages has become much easier thanks to Opera Mini browser. With cloud-based rendering of complex scripts, Opera enables its users to view Unicode compliant webpages even in low-end phones that doesn’t have Indic rendering capability. The list of supported devices by Opera Mini is huge and it includes Apple’s iconic iPhone, Google Androids, and many more devices made by Nokia and other major manufacturers.

To view Indic contents in Opera Mini, you need to do following two steps (see this or this for detailed instructions):

  1. Type config: in the address bar and then press enter
  2. Set Use bitmap fonts for complex scripts to Yes and then Save

Also, turning on Mobile view in settings helps to load webpage faster. Here is a screenshot of my Nexus One showing Unicode-compliant Rabindra-rachanabali website in Bengali.

Unicode Bangla in Nexus One

Other than Opera Mini, some phone also has native Indic rendering capability either partially or fully. Here are screenshots of a little app that I wrote for accessing Anubadok Online. This app with embedded Lohit-bengali font, should work in Android phones 1.6 or higher.

Anubadok Online on Android

You can download the app from here and source code from here. The matras are not in correct order out of the box (on the left) whereas a little bit of manipulation could display them correctly (on the right). Native Indic rendering in Android may improve soon as Skia graphics library, used in Android, now includes Harfbuzz rendering engine.

Overall, the rise of mobile internet in India may be a boon for digital representation of Indian languages. As the need for local language contents grows, it will widely encourage the adoption of Unicode in India. It may also force many content providers to abandon their non-standard encoding that they continue to use even now.

Read Full Post »

On the new year’s day, the Anandabazar Patrika, the largest Bengali newspaper from West Bengal, begins one of their editorial with the sentence — “সাম্প্রতিক পশ্চিমবঙ্গের জনপ্রিয়তম শব্দবন্ধ ‘পরিবর্তন চাই’” (“The most popular words in recent Bengal — ‘We want change'” ). The same editorial ends with the proposition — “নূতন বৎসরের মূলমন্ত্র হউক ‘পরিবর্তন চাই’” (“Let the mantra for new-year be — ‘we want change’ “). Leaving aside the politics, there is a serious need of change in technology adoption in West Bengal and that is to help its beloved language Bengali to survive in its digital avatar.

In their own words, the Anandabazar Patrika (ABP) may sound like a champion of change but in practice they are no different. Being a leader in Bengali publishing industry, one might expect them to be in forefront in improving the digital standard for Bengali. Unfortunately, their action speaks just the opposite. They continue to use non-standard, bitstream font technology in their website instead of using international standard, the Unicode. One of their “supported browser” is Netscape Communicator whose official support has ended in 2008. They also recommend the use of Firefox plugin Padma. Being the author of ABP support in Padma, this seems rather strange to me. They are asking users to convert their contents to Unicode (by using Padma) rather than serving their contents directly using Unicode.

It may be mentioned that like many other non-Latin languages, digital representation of Bengali texts suffered from a lack of encoding standard in its early phase. However with the advent of Unicode, the universal encoding standard, this is no longer an issue. The Unicode standard has been widely adopted across different operating systems and all recent versions of Windows, Mac or Linux support Unicode natively.  According to a statistics from the internet giant Google, the Unicode is most frequently used encoding on the internet since 2008.

Nevertheless, there has been a significant increase in Unicode adoption also for Bengali in recent past. Let me mention some of them.


In may be noted that Bengali is the national language of Bangladesh and they too suffered from the same problem. However, there has been a dramatic increase in adoption of Unicode lately. The largest news paper from Bangladesh by circulation, the Prothom Alo, has now switched to Unicode. Until recently they were using their own proprietary encoding. Other prominent news papers that have switched to Unicode from proprietary encoding are Amar Desh, Sangbad, Daily Sangram, Manab Zamin, Samakal.

West Bengal:

The West Bengal government has now adopted Unicode 5.0 as the standard encoding for Bengali. Their official website Banglar Mukh has finally switched to Unicode. Furthermore, with their funding the entire literary work of Nobel laureate Rabindranath Tagore has been released using Unicode. Tagore’s works are now in public domain due to the expiration of copyrights. The credits for these encouraging developments must go to the Society for Natural Language Technology Research and the company behind some of these implementations, the MAT-3 Impex.

Coming back to the technology front, there is now a new kid in the great browser arena, the Google Chrome. This snappy browser while supports Unicode natively, currently uses a buggy font for Bengali by default. This causes some Bengali texts to appear garbled. Most of these issues can be solved by simply changing its default font. To do so click on

Wrench-->Options-->Under the Hood-->Change fonts and language settings

and then choose the font of your choice for Bengali. For example in Ubuntu you can choose Freesans or Freeserif. These fonts have nice glyphs for Bengali.

Read Full Post »

Padma is a Firefox plugin that enables users to read various Indic websites by converting their non-standard text to Unicode text. Padma has supported Anandabazar Patrika (ABP), the largest Bengali newspaper, for more than two years now. However, ABP (also Bartaman Patrika) support in Padma has a major matra-rendering bug which is explained in details here.

Couple of months ago, I made an effort toward fixing the above issue. You can get an improved version of Padma from here. This version resolves most of the matra rendering issue (if not all) for both Anandabazar Patrika (ABP) and Bartaman Patrika.

Update (Jul 9, 2010): To solve this problem at its root, please visit Anandabazar Unicode petition site where you can read Anandabazar using any browser such as Firefox, Chrome, Opera, Safari, IE as well as mobile phones.

Read Full Post »

For last few days I have been experimenting with several Javascript-based virtual keyboards mainly for using in Ankur‘s English to Bengali dictionary project. This dictionary project is aiming for a comprehensive English to Bengali dictionary, freely available to everyone. As of now the project ranks highly in Google search for the keywords “English to Bengali dictionary”. This dictionary project relies on user contributions for enhancement of its database. Thus we needed a browser-based solution aimed at helping users in contributing new dictionary entries (in Unicode Bengali) using standard English keyboard and without using any keyboard layout. It also helps to avoid transliterated contribution in English where it should rather be typed in Unicode Bengali.

We have been using bnwebtools for last one year for the purpose. However, this tool has gone in non-GPL direction recently. So we needed a replacement. I was, nevertheless, looking for not just a replacement but also having a next-generation solution :-).

After playing with few of them I decided to explore the Javascript VirtualKeyboard by Ilya Lebedev. To my surprise, it already had supports for many Indic keyboard layouts. Unfortunately, it didn’t have any Bengali layouts. It appeared that to include a new layout, the layout needs to be described in *.klc file, built using the Microsoft Keyboard Layout Creator tool. Given I had no intension in booting into windows, I wrote a Perl script for creating the *.klc file in the desired format.

To begin with I have converted three Bengali layouts. For Inscript layout, I chose the Baishakhi Inscript used in Baishakhi Linux which is being promoted by Govt of West Bengal (Nevertheless see the recent postings by Sayamindu, Sankarshan, Runa on some controversies surrounding it). Then I converted Ankur‘s Probhat layout which I have been using since the beginning. I also converted, another popular Bengali layout Unijoy.

To see this virtual keyboard in action visit Ankur E2B dictionary project or its virtual keyboard demo page. If you have used this virtual keyboard and have any comments/suggestions on it, then please feel free to post them here.

Read Full Post »

After a gap of almost two years, I am happy to announce the second official release (version 0.2.0) of Anubadok a free (as in freedom) machine translation system for English to Bengali. Anubadok is written in Perl and it uses Penn Treebank annotation system for natural language processing. To run Anubadok 0.2.0, you need to have Part-of-Speech tagger GPoSTTL installed in your system. The Anubadok system can be accessed online using the interface Anubadok Online run by Ankur.

First official release (ver. 0.1) of Anubadok was an experimental release which mainly served as a proof-of-concept for an open-source English to Bengali machine translation system.

With the release of version 0.2.0, I am glad to upgrade its official tag from “an experimental software” to “a software under development” with clear-and-specific implementation targets. However given the nature of the project, there are no specific time-frames for future releases. Further, given machine translation is considered an open research topic in Computational Linguistic, you should expect to see some surprises 😉 even for well implemented situations. Specially, if you are comparing results of machine translations with human translations.

In English, there are four types of sentences: Declarative, Imperative, Interrogative and Exclamatory. These sentence types further fall into four basic sentence type: Simple, Compound, Complex and Compound-Complex.

The table below gives approximate status of implementation for each sentence type in the current release and inversely it gives the targets for future implementations.

Status Table (Version: Anubadok-0.2.0 )
Declar. Imper. Interro. Exclam.
Simple W W W M
Compound M M M M
Complex N N N N
Compound – Complex N N N N

W: Well implemented
M: Moderately implemented
N: Not/Not-well implemented

Anubadok does not yet have any code to handle Complex or Compound-Complex sentences, not even moderately. This is where next push for development is needed.

Few other salient features of this release:

  • The execution method of Anubadok system has been re-written. Anubadok itself has been implemented as Perl module. This means one can now access Anubadok in a Perl program directly by including Anubadok libraries (Perl modules) or in any other program by using appropriate Perl module wrapper.
  • The notion of “testsuites” has been introduced for Anubadok. For a given English sentence, it compares a machine translated sentence with the expected Bengali sentence. This is quite an useful tool while adding new features or doing some experimentations as it would ensure that already implemented algorithm are not affected.
  • Anubadok system can now handle several kinds of input documents including plain text files, any XML documents, HTML files with in-line javascript, CSS. Further, as earlier, it is capable of translating Portable Object (PO) files directly.
  • Anubadok packaging has been completely reorganized to ensure that it has the basic structure of a standard Perl package. Consequently, Anubadok can be installed following the method of standard Perl module installation.
  • Anubadok-0.2.0 comes with an updated dictionary having 15K+ entries in its database. This is almost double the number of entries it had in 0.1 release. Credit for this goes to all the contributors of Ankur English to Bengali dictionary project. Anubadok’s dictionary are now updated regularly using database dumps of Ankur E2B dictionary.
  • Anubadok has now moved to its new website hosted by SourceForge.


    Latest source codes of Anubadok can be downloaded from the “trunk” branch of its SVN repository.

  • Anubadok Online, the online interface to Anubadok system, has been upgraded substantially. It runs directly using SVN version of Anubadok engine. User contributed new entries though this interface are submitted automatically to Ankur E2B dictionary project.
  • A brief document is now available for download as a PDF file from its website. It describes the internal working and the algorithm used by Anubadok system by considering specific example sentence.

Read Full Post »

[Update: Please see at the bottom of this post for a link to an improved version of Padma.]

Anandabazar Patrika (ABP) and Bartaman Patrika (BP) are two (among big four) well-known Bengali news papers that are published from West Bengal, India. In the Internet era, their online versions are not just a matter of convenience rather the only route of access for many of us. Unfortunately, their online versions continue to live in the past by using non-standard, ancient dynamic font technology instead of upgrading to standard Unicode.

The worst part is that to view their website you need to have Internet Explorer installed in your machine. So if you are Linux, Mac (or any non-Windows) users then you are left at your own.

Fortunately, there is now a simple way for Firefox users in Linux and Mac to read these websites using a Mozilla extension named Padma by Nagarjuna Venna and his team. To get Padma working, (a) you need to have Unicode Bengali font (Linux users may already have one. Mac users can get one from Ekushey), (b) you need to have Firefox (version 3 is recommended for Linux but must have for Mac), and (c) and you need to install Padma.

Padma can transform given non-standard encoding to standard Unicode on the fly. Of course, for Padma to work, it must know the font-encoding of the particular website.

As it turns out, I wrote support for ABP in Padma more than a year ago. My job was made simple by an earlier CGI program by Tanmoy Bhattacharya who had already decoded font-mapping for ABP. Couple of months ago, I also added support for Bartaman Patrika in Padma. So, courtesy Tanmoy’s font-map decoding, latest version of Padma (0.4.13) supports both ABP and BP.

There is a known issue of incorrect rendering of Bengali Matras in certain situations. See for example Runa-Sankarshan’s photostream here. Many of these were due to a simple bug and has been fixed in the latest version (0.4.13). However, fixing of the remaining requires significant changes in Padma. ABP and BP both use three different fonts simultaneously. Most ligatures often come from 2nd and 3rd font whereas Matras come from the 1st font. Padma transforms each font separately and doesn’t merge these different fonts elements into a single element. This leads to the incorrect rendering which is hard to solve without changing the core of Padma.

The Bigger Issue however is the need for Padma itself. I tend to agree with the concerns expressed by Sankarshan in a discussion thread here. The real question is then how long are these websites going to keep themselves confined using their own non-standard encoding?

This led me to wonder: don’t their technical staffs realize what they are missing by not upgrading to Unicode? Firstly, by upgrading to Unicode they could readily expand their current user base. Secondly, the use of Unicode will make their contents search-able in search engine like Google. This could lead to additional search-engine generated revenue for them. The number of Bengali internet users is going to increase in coming future, and a significant portion of new internet users will be coming from the interior part. Undoubtedly, many of these users will be more comfortable in searching using Bengali keywords. Thirdly, by continuing the use of non-standard encoding, they are piling up their archive with non-standard contents which would require a big effort by them to bring into standard form. So, in my humble opinion, it would be prudent decision for them to upgrade their website to use Unicode sooner than later.

Nevertheless, there is now a positive sign that Star Ananda, a sister group of Anandabazar Patrika, has started using Unicode (though their defined “charset” doesn’t say so) for their Bengali website. I hope, this marks the beginning of change.

Update (May 9, 2009): Please see this post for an update on the above mentioned incorrect rendering issue.

Read Full Post »

Older Posts »