If you have a need to use Mongolian dictionaries there one great open source software called Stardict. It has many free dictionaries but lacks Mongolian dictionaries. Here is my attempt make it.
To use pre-compiled stardict dictionaries:
You will need stardict-tools. It is collection of usefull commands for stardict format and other dictionary formats. On debian based systems you can install with apt-get:
$ sudo apt-get install stardict-tools
Make a tab separated file containing one term per line. For example:
aeroplane n. нисдэг онгоц. afresh adv. цоо шинээр, дахин. afternoon n. үдээс хойш.
This file has 3 lines, each starts with a term and then TAB character, and then definition.
$ /usr/lib/stardict-tools/tabfile dictionary.txt
It'll create 3 files:
You should edit dictionary.ifo file to set name of the dictionary. But don't touch lines wordcount, idxfilesize, sametypesequence. These are internal info for startdict to understand structure of dictionary file. To install built dictionay create a directory under /usr/share/stardict/dic and copy 3 files above into new direcrtory.
You'll need dictconv and stardict-tools. On debian based systems you can install with apt-get: $ sudo apt-get install dictconv stardict-tools
Or you can build the tool from source.
Let's assume you had a babylon dictionary file named dictionary.bgl
To convert bgl file to dic file run: $ dictconv -o dictionary.dic dictionary.bgl
Converted dictionary.dic file is simple tab separated text file. So you can open it in any text editor to see if it converted correctly.
Most old Mongolian dictionary files tend to be in some non-standard encodings. If that is the case, you should use transcoder scripts accompanied in script directory of this repository. There is 2 transcoder scripts for 2 different encodings for now. Please use one of them and see if it fixes the file by open it in text editor, otherwise try another one. $ mon2unicode.sh dictionary.dic or $ mgl2unicode.sh dictionary.dic
Then there should be UTF-8 encoded new file dictionary.dic.utf8.
$ /usr/lib/stardict-tools/tabfile dictionary.dic.utf8
You could edit dictionary.ifo file to change some meta info like name of dictionary etc.
melug for mappings for mon2unicode.sh.
© 2009-2012 by Ochirkhuyag.L. It is licensed under the MIT license.