ochko / stardict-mn-dics

Mongolian dictionaries for Stardict

Home Page:http://ochko.blogspot.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#Mongolian Language dictionaries for Stardict

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.

#How to use

To use pre-compiled stardict dictionaries:

#How make your own dictionary from scratch

##Requirements 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

##Create your terms 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.

##Compile dictionary $ /usr/lib/stardict-tools/tabfile dictionary.txt

It'll create 3 files:

  • dictionary.dict.dz
  • dictionary.ifo
  • dictionary.idx

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.

#How to convert from babylon dictionaries

##Requirements 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.

##Convert babylon to dic format 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.

##Fix encodings 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.

#Thanks!

melug for mappings for mon2unicode.sh.

#Copyright and License

© 2009-2012 by Ochirkhuyag.L. It is licensed under the MIT license.

About

Mongolian dictionaries for Stardict

http://ochko.blogspot.com


Languages

Language:Shell 100.0%