The News

Rajiv wrote an Android 2.2 client for looking up meaning of words using Silpa dictionary service. It currently supports only the English-Malayalam and English-Hindi dictionaries though, but works well enough for daily usage.

Yes – you can read the meanings in Malayalam even though Android 2.2 doesn’t support Malayalam rendering.

Screenies:

 

Silpa Dictionary Client - Dictionaries

Install

An APK is available here. Install it by browsing this site through your phone and clicking on the link or by downloading the APK into your phone’s storage and opening it from the phone.

How it works

It uses SILPA project’s dictionary service to retrieve meanings as rendered images. Internally, the dictionary module makes use of the Script rendering module (which is still under development) to generate an image of the word’s meaning.

Hack

The code for the android client is available in Rajiv’s Github.  Knowledge of Java and standard Android development setup is enough. Official SILPA code repo is available here. You need to know python and install assorted libraries as well. Do go through SILPA setup instructions.

Credits

Android client written by Rajiv R Nair, long time SMC member, co-author of  Freedom Toaster software, fellow FOSS enthusiast and a very good friend.

Vasudev Kamath , contributor and maintainer of  SILPA project, for advice and help in committing and pushing code to Silpa server.

Santhosh Thottingal , founder of SILPA project and long time SMC contributor, for constant  support and advice.

Anish A- SMC member, FOSS lover,  fixed a showstopper bug in the SILPA dictionary module

Me – I wrote a few lines of code to hook together the existing modules on server side to make Rajiv’s job easier. So I can now claim that I have contributed to SILPA project :D

SILPA project’s new features

For those interested in actual details of the changes in SILPA, what I did was

  1. Add a small function that calls the script rendering module with the word’s meaning – this returns an image URL
  2. Modify the SILPA dictionary module to support a GET , that will invoke the above function and set the image URL as the content, with an HTTP redirect header. Thus anyone trying to do a GET with the following parameters will be redirected to the image.

Generically, a GET of the dictionary module’s URL with the following request variables are supported

Required ( Omitting any of these results in a server error )

  • image : if set to “y”, a renderd image(png) of the word is retrieved. Else meaning in Unicode text will be retrieved.
  • text: word whose meaning is to be looked up
  • dict: the string that denotes the dictionary to be used. ( refer the Silpa Dictionary module for list of values)

Optional ( Supported only when image is set to “y”, needs more testing)

  • imagewidth ( defaults to 300 )
  • imageheight ( defaults to 200 )
  • fontsize ( defaults to 12 )

eg: http://silpa.org.in/Dictionary?image=y&text=freedom&dict=en-ml&imagewidth=500&imageheight=500&fontsize=16

How it all came to be

The week before this one was particularly hectic at work, and me and Rajiv were pulling off long days. I hadn’t logged into GTalk for ages and I decided to log in so I could let my head cool. I somehow starts talking to Santhosh, and when I leave, continue to chat on my Android – of course it doesn’t display Malayalam. That somehow must have gotten my mind into some alternate track because last Sunday morning, at around 2.a.m, I asked Rajiv to write an Android client, that will make use of the Silpa service. We immediately set to work, me exploring the Silpa API and Rajiv cursing the Eclipse IDE when he tried out Android development.

By late Sunday night, we had a working version that run on the emulator, that makes use of SILPA’s JSON API. This version would first make a call to the dictionary service and retrieve the meaning, then use that meaning to invoke the render service. The render service’s JSON API will return the URL to the generated string. This was only a proof of concept, so to speak.

We talked to Santhosh about it, discovered a bug in dictionary module (that Aneesh fixed ) and finally I ended up making changes to Silpa code to reduce calls to the server. The rest, on my part, was messing around with github, gitorious and talking to Vasudev about code changes and getting him to push changes on the server. Vasudev, being a good sport, tolerated my pestering and was a great help in getting the changes across to the official SILPA repo and server instance.

Rajiv relentlessly slogged to re-write the app in a non blocking, threaded manner, and polished the UI.

Today we have the app almost ready, and as I am writing this, Rajiv is adding the credits screen to the app, and will be uploading the changes to his github repo soon.

Everyone! download, test and report bugs to Silpa mailing list

Tagged with:  
Share →

2 Responses to The Silpa Dictionary client for Android

  1. Aniah A says:

    My name is Anish A, not Anish NL and also, I am not a terrorist, oh sorry, opensource lover.

    I am a free software activist.

  2. Kalesh Kumar says:

    Great !!!! Thank you all!!!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>