English-Malayalam Dict [RFC2229]

When Santhosh Thottingal sent out the task to create English-Malayalam/Malayalam-English dictionary conforming to Dict Protocol, I didn’t care much. Just took a look and left it there. But later when he pinged and urged me to take it up – providing many required resources – I just thought I’ll take a look at it. And thus started scratching another itch.

The Govt of Kerala is well known for its support for Free/Open Source Software. And they’ve been doing a pretty good job. But I was surprised when I got the link to an English-Malayalam Dictionary with a Python frontend. And the best part is this – it is GPL’ed.

And I set out to convert the data found inside to suite to the Dict Protocol [RFC2229]. An ugly shell script turned out to be a nice one after 3 days of carving and craving.

This is how it is done:

  1. Format the input file in the format :  {headword\n\tdefinitions}.
  2. Use dictfmt to convert to Dict format : dictfmt -f –utf8 -s Dict-English-Malayalam -u smc.org.in dict-en-ml < <input_file> && dictzip dict-en-ml.dict
  3. This will create two files dict-en-ml.dict.dz & dict-en-ml.index.
  4. Install “dictd“.
  5. Create folder “/usr/share/dictd” if it doesn’t exist.
  6. Copy dict-en-ml.dict.dz and dict-en-ml.index to “/usr/share/dictd
  7. Create file “/etc/dict.conf” and edit it. Put “server  localhost” and save.
  8. Create file “/etc/dictd.conf” and edit. Put :      “database Eng-Mal  {data “/usr/share/dictd/dict-en-ml.dict.dz” \n\t index “/usr/share/dictd/dict-en-ml.index”}
  9. Start the dictd service by “/etc/rc.d/init.d/dictd start
  10. Use your favourite dictionary frontend and lookup!

And, here’s a preview as well:

dictionary

There’s still some more work to do, viz. incorporating the grammatical components (like Noun, Verb etc).

We, at Swathanthra Malayalam Computing hope to release it soon, and even an RPM package as proposed by Sankharshan Mukhopadyay.

Stay tuned.

Advertisements

4 thoughts on “English-Malayalam Dict [RFC2229]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s