Saturday, March 19, 2011

Announcing the Silpa Indic languages Dictionary client for Android




Some time last week aashiks came over with an idea that we should throw an android front end on top of the brilliant Silpa language computing framework.

Even though Android inherently supports unicode, rendering of Indian languages like Malayalam etc are not supported. So when it was time to write a english->malayalam/other indian language dictionary client for android there was only one way to do it. Render whatever we wanted to display server side and pass it on as an image on the phone.

The Silpa framework had disjoint support for what we wanted i.e
1. Look up meaning for a given word in a given language
2. Render text in a given language and throw back the text as an image

Making two seperate calls to do something sounded a bit tedious. So ashik decided to wrap them both into one Silpa module that returns back the image in response to a simple HTTP GET, while I decided it was finally time to dip my feet in the Android SDK.

Impressions: Android SDK is awesome, Eclipse is a bitch

Our first running version of the client did its job but in the most fugly way possible. Being the Android n00b that I was , did'nt have enough sense to realise that HTTP calls shouldnt be made from the main activity. This resulted in the whole app freezing until the server responded with something.

After some frantic googling I came over this brilliant article in android developer blog

http://android-developers.blogspot.com/2010/07/multithreading-for-performance.html

The usecase specified there was exactly what we were looking for(with very very minor modifications). Couple of hours of copy-paste-type-type-type later, we had what we wanted.

During the course of development we also ran into some minor issues with the Silpa dictionary like no response if the word was capitalized, resulting image being cut slightly at the top etc etc. All these were fixed promptly by the Silpa overlords Vasudev Kamath and Santhosh Thottingal.

So finally a week after the idea was conceived by aashiks we have a beta quality client out. It supports meaning lookups for English->Malayalam and English->Hindi

The entire source for the app can be found at https://github.com/rajivnair/Silpa-Dictionary-Android-client

You can download the unsigned apk from https://github.com/downloads/rajivnair/Silpa-Dictionary-Android-client/Silpa%20Dictionary.apk

Feel free to fork and may the foss be with you all.