New user registration is currently disabled due to spam abuse / Регистрация новых пользователей в настоящее время приостановлена из-за злоупотреблений спаммерами

Custom dictionary

All about dictionaries

Custom dictionary

Postby Alchemikaz » Wed Aug 26, 2009 11:14 am

I want to create my custom dictionary where I must use definitions with images. Babylon .BGL files support images, but it isn't explained in Babylon Glossary Builder how to add images. How could that be done using Babylon Glossary Builder or any other software?
Posts: 1
Joined: Wed Aug 26, 2009 11:06 am

Re: Custom dictionary

Postby C2BlEv » Wed Aug 26, 2009 2:27 pm

Don't know about Babylon but Lingvo DSL format is pretty easy (just a text file that can be read by Golden Dict without any compilation necessary)

Here is a valid dictionary (you can put the text below into a text file name it "SampleDictionary.dsl" and save it in UTF-8 encoding, then GD can open it, the wav and jpg files should be in the same folder or zipped into a file "" in the same folder):
Code: Select all
#NAME "Dictionary Name"

   / [s]abacusBr.wav[/s] ˈæbəkəs; [p]NAmE[/p] [s]abacusUS.wav[/s] / [c]noun[/c] [s]abacus.jpg[/s]
    ([p]pl.[/p] [c darkcyan][b]aba·cuses[/b][/c] / [s]abacusesBR.wav[/s] -kəsɪz; [p]NAmE[/p] [s]abacusesUS.wav[/s] /) a frame with small balls which slide along wires. It is used as a tool or toy for counting.
Posts: 212
Joined: Tue May 05, 2009 3:45 pm

Re: Custom dictionary

Postby MaximeB » Thu Sep 24, 2009 5:12 pm

You can create a dictionary in Babylon format and compile it with stardict-editor (see on Stardict site) or stardicttools under Linux (it is in the Ubuntu repository).
You create a plain text file in UTF-8 encoding.
The first line must be empty. The last one too.
The structure of data is show by the example below.
As you can see you can use HTML tags to format text and include pictures.
You can link to other words in the dictionary with bword.

I suppose you can also compile this file with the tool from Babylon, but I have never tried it.

------Beginning of file----

#bookname=Best dictionary in the universe
#author=Genius Junior
#description=Dictionary with incredible definitions.

'bout <font face="Kingsoft Phonetic Plain" color="#0000ff">/baUt/</font> <i>adv, prep spoken informal</i> <br>about<br> <img src="8CB0DC57.png"><font color="#004080"><i>What are you talking 'bout?</i></font>

'em <font face="Kingsoft Phonetic Plain" color="#0000ff">/Em/</font> <i>pron spoken</i> <br>sometimes used as a short form of 'them'<br> <img src="8CB0DC57.png"><font color="#004080"><i>Go on, Bill, you tell 'em!</i></font>

<A href="bword://abat">abat</A> 

------End odd file-----
Posts: 14
Joined: Thu Sep 24, 2009 2:16 pm

Re: Custom dictionary

Postby MaximeB » Fri Sep 25, 2009 10:54 am

To learn more about formatting dictionaries, you can decompile existing dictionaries and see how they are made.
For example, you can decompile Babylon .BGL files
In Ubuntu, this is done with /usr/lib/stardict-tools/bgl2txt
The package stardict-tools must be installed.
Look at the other files in /usr/lib/stardict-tools/ to see other possibilities.
Unfortunately I haven't been able to find much documentation on what the different tools do and how.
Posts: 14
Joined: Thu Sep 24, 2009 2:16 pm

Return to Dictionaries

Who is online

Users browsing this forum: No registered users and 4 guests