Tuesday, May 16

z3reload moved to the Zope 3 base

A small project of mine, z3reload, which implements very basic view code reloading, has moved to the Zope 3 Base. Hopefully that will make it a bit more visible. Zope 3 is already fragmented as is, some consolidation can't hurt.

Monday, May 1

Russian to English dictionaries on Linux

Update (2008-09-13): the dictionaries in http://dictd.xdsl.by/dicts are probably more complete than the ones provided here, see this post for more information.

It is very convenient for me to have a local dictd server set up, not only to look up obscure English words and jargon, but also for translation from foreign languages. Dictd is quite fast and powerful, with a multitude of dict clients to choose from. There are some pretty good free dictionaries too. For German, the dictionary in the Debian (Ubuntu) package dict-de-en (German-English + English-German) is fairly good. For Russian, the Mueller English-Russian dictionary (mueller7accent-dict) is great.

Unfortunately, the Mueller dictionary does not contain translations from Russian to English. I have been using ksocrat for that purpose, but KSocrat is a little buggy and its usability does not shine. I looked around on the web for a downloadable Russian-English dictionary in dict format, but surprisingly could not find anything useful. There are quite a few online translation sites, heaps of small DOS-era utilities and some home-made Windows stuff, but nothing that would be easy to feed to dictd. What I did find was Sdictionary.

Sdictionary is a dictionary application that has a fairly large community. Its Russian-English dictionary with 300 000 words was more than adequate for my purposes, but the database format was incompatible with dictd, and I couldn't find a converter on the web, so I wrote one.

The converter from Sdictionary to Dictd formats is a bash script that dumps an Sdictionary file to a plain text file and massages it a bit so that it can be fed to dictfmt. To use the script you will need to install PTkSdict from swaj.net (Debian package) and the Ubuntu packages dictfmt and dictzip. Then just drop the script in the same directory as some dictionary foo.dct and run ./sdict2dictd.sh foo (where foo is the name of the dct file). The script should produce foo.dict.gz and foo.index which you can install into /usr/share/dictd. The script is far from perfect and discards some formatting but it's better than nothing. The best solution would probably be to extend dictfmt so that it could read the Sdict dump files directly.

If you just want a dictd Russian-English dictionary, I have uploaded the files converted from Sdict here: rus_eng_full.dict.dz (8MB), rus_eng_full.index (15MB).

By the way, when running in daemon mode, dictd eats an unreasonable amount of RAM (it's taking 40MB resident memory on my machine). If the dict server is only for personal use, it makes sense to run it through inetd as described in /usr/share/doc/dictd/README.inetd.gz. It appears that the speed difference is not noticeable on modern computers.