Monday, January 30, 2012

Urdu to English Dictionary

Translators are not super humans or machines which take input in one language and provide output in another. They are like ordinary people, but a bit clever in using a dictionary. So it is the dictionary which makes a translator 'actual' translator. As there is always a women behind a successful man, there is a good dictionary behind a successful translator, in this case I must say a bunch of dictionaries. :-) As I work as a translator English <-> Urdu and Punjabi. En <> Ur combination is mostly demanded and for this purpose I am in a continuous need of dictionary. I had a dictionary for English to Urdu, as I mentioned here my adventure to integrate dictionary word list to OmegaT. 

This dictionary solved half of my problem i.e. En > Ur. But the revrse was still a headache. I always had to refer to for searching English equivalents of Urdu words. But then, as I always sometimes do, I woke up and decided to do something on my own. So what I've done is changed the English > Urdu wordlist to work for Urdu > English purposes. It is a dirty solution, there are still lots of problem in the word list, and ideally there should have been a word list typed specifically for Urdu > English purposes. But this quick dirty solution works in most cases for me. And I am sharing it here online, so people struggling for Urdu > English equivalents may get some relief. There are lots of good dictionaries out there, but this is yet another dictionary in already available variety. And hopefully it will benefit other translators and users.
Urdu to English Dictionary in C#
There is nothing fancy, no help, no license and no xml type system to store word list. The word list is simply a text file with entries on new line and Urdu words are separated from English counterparts using a tab. The dictionary loads this file and then searches for appropriate word. The search pattern in very simple. By default it will search for exact match (which is dictionary look up method of c#) and additionally it will iterate through all dictionary key value pairs and add the entries which start with search query. The second radio button, if checked, will only give exact match, or if nothing found there won't be any result. This much is sufficient for me in most cases. I am hoping it would be for most people as well. It is compiled on Windows 7 64 bit. So I am not sure whether it would work on every system (including Windows 7 32 bit). But I am attaching source project as well as compiled dictionary. The project can be compiled using Sharp Develop 4. The dictionary assumes that you have installed Jameel Noori Nastaleeq. Please get it if you don't have.
Source Code (Sharp Develop Project) 

Update: Another dictionary was added afterwards, a 27000 words dictionary provided from
Source Code


Sarah Kmu said...

An interesting post!
Is dictionary really the thing behind great translations and if so how will we explain: lost in translation(s)?
Having said that, I guess creativity has to be acknowledged!

Muhammad Shakir Aziz said...

Well this was a little bit exaggerated :-D.
Creativity always matters, and translation is not a simple process to explain in a few lines. There are lots of other skills which should be there in a translator.

Post a Comment