You are on page 1of 4

Create your own Kindle dictionary for every language for free:

Advantages:
1. you dont have to install any software, no Python stuff, no big generator installations.
2. you can chose every language you like as long as there are database sources in text format
available.
3. it only takes about 30 minutes to generate a dictionary with 800.000 entries

Tab-delimited File Tips:


1. A tab-delimited file is a text file that's set up with a tab separating each column of text.
2. Before you export your file from a database application, take a look at their FAQs or support
page for instructions on how to save as a tab-delimited file. It's a standard export format,
but since every application is different, the steps will vary.
3. You can also export data as a tab-delimited file from most spreadsheet applications. Make
sure your file ends with a ".txt" extension.
4. After you have a tab-delimited version of your list, open it in a spreadsheet program to
arrange and format your columns for import to MailChimp.
5. When you export the final, edited list from Excel, make sure to save it as a tab-delimited file
again.
6. If you run into other problems with your list import, check out these list import
troubleshooting tips.

Step by Step instruction:


1. Getting Dictionary Database File:

1. StarDict Dictionaries: (http://stardict.sourceforge.net/Dictionaries.php)


2. Dictionary database: (http://dict.cc)

2. Converting to tab delimited format:

1. Stardict dictionary can be converted into a tab delimited format file by the stardict editor
program (http://stardict.sourceforge.net/other.php)
2. Edit the file in text editor (Notepad++). Delete the comment header and the empty line at
the beginning of the file.
3. Name the tab delimited format file: (dictionary.txt)

3. Converting to html and opf formats:

1. Use tab2opf.exe to generate a .opf file. Put all package files (dictionary.txt) with tab2opf.exe
and other extacted files. Open a command line window and execute the following
command: tab2opf.exe dictionary.txt. This generates dict.opf and a bunch of html files. If
you are trying to compile a dictionary for a language with non-English characters, use -utf
option. eg: tab2opf.exe -utf.
2. Use tab2opf.py (http://www.klokan.cz/projects/stardict-lingea). This is a free python script
by Petr Klokan, so youll need python isntalled. Type in the command line in cmd: tab2opf.py
dictioary.txt This will give you a dictionary.opf file and a number of dictionary0.html files. If
you are trying to compile a dictionary for a language with non-English characters, use -utf
option. eg: tab2opf.py -utf.

4. Editing opf file and generating cover:

1. Generate a cover image in 3x4 aspect ratio: (cover.jpg).


2. Edit the dictionary.opf file to specify the dictionary name, cover image file and input/output
languages of the dictionary.
3. Format of .opf file:

<?xml version="1.0" encoding="utf-8"?>

<package unique-identifier="uid">

<metadata>

<dc-metadata xmlns:dc=http://purl.org/metadata/dublin_core
xmlns:oebpackage="http://openebook.org/namespaces/oeb-package/1.0/">

<dc:Identifier id="uid">CBC22904A6</dc:Identifier>

<dc:Title>Dictionary</dc:Title>

<dc:Language>en</dc:Language>

<dc:Creator>Author</dc:Creator>

<dc:Publisher>Publications</dc:Publisher>

<dc:Date>dd/mm/yyyy</dc:Date>

<dc:Copyrights></dc:Copyrights>

<dc:Subject BASICCode="REF008000">Dictionaries</dc:Subject>

</dc-metadata>

<x-metadata>

<output encoding="utf-8"></output>

<EmbeddedCover>Dictionary.jpg</EmbeddedCover>

<DictionaryInLanguage>ln1</DictionaryInLanguage>

<DictionaryOutLanguage>ln2</DictionaryOutLanguage>

</x-metadata> </metadata>

<manifest>
<item id="html1" media-type="text/x-oeb1-document" href="Dictionary.html"></item>

<item id="img1" href="Dictionary.jpg" media-type="image/jpg"/>

</manifest>

<spine> <itemref idref="html1"/> </spine>

<tours> </tours>

<guide> </guide>

</package>

5. Converting to mobi or prc format:

1. Amazons mobigen to generate the dictionary itself in the final step. you will get
dictionary.prc.
2. Get mobigen.exe form (http://www.mobipocket.com/soft/prcgen/mobigen.zip) Put all
package files (dictionary.opf, .html files, cover.jpg) with mobigen.exe. Run the command on
cmd: (mobigen.exe dictionary.opf ). Youll get dictionary.mobi.

Errors and Solutions:


Err 1. After I select *.dict.dz file, It verifies. BUT If I select decompile, it says

Building...

Error, file version is not 2.4.2

Done!

What does it mean?

Sol 1.1. What i did, was I extracted the .dict file from the .dz (i don't know what kind of encryption
this is, but ctrl-pgdown in total commander dealt with it.) In stardict editor under
decompile. you need to select the ifo file. Sometimes it refused to decompile giving me the
error message. same type sequence not m, but after changing the same type sequence=x
line in the ifo file to same type sequence=m it decompilled.

Sol.1.2. The .dz file is actually a .gz format archive. You should rename the .dz to .gz, then unpack it.
There should be a .dict file in it. The .dict file is the uncompressed dictionary file for
decompiling.

Err 2. Traceback : (most recent call last):

File tab2opf.py, line 240, in (module)

ValueError: need more than 1 value to unpack

Sol 2.1. tab2opf did stop somewhere at first letter N.

This happens if there is no translation available, just one word in the line. The error message
need more than 1 value to unpack tries to point it out. tab2opf shows the last successful
word before the error occurs. Search this word in the dict.txt file and the next line should be
causing the problem. Delete this line.

Sol 2.2. Open dict.txt and search for the last printed word before the error. Next to it there will be
some text that is not following the pattern remove it. Example:

aaa noun bbb

noun

ccc verb ddd

I removed separate 'noun' from a single line and saved the file:

Err 3. what about inflection? For instance make, makes, made.

Sol 3. Sorry, but that wont do as long as they are not separately mentioned.

Err 4. I cant go through the 4 step! Cmd is talking something like: 'name tab2opf.exe isnt
recognisable as.

Sol 4. This might solve the problem: Open the CMD line. Drag tab2opf.exe onto command line
window; hit the space bar. Drag dict.txt onto command line window; hit enter and it will
work through the file.

Important Links:
1. http://stardict.sourceforge.net/Dictionaries.php
2. http://stardict.sourceforge.net/other.php
3. http://www.klokan.cz/projects/stardict-lingea
4. http://dict.cc
5. http://www.mobipocket.com/dev/ Developers of file format
6. http://s3.amazonaws.com/kindlegen/ Amazon Kindle Publishing Guidelines
7. http://blog.mikeasoft.com/ an alternative instruction
8. http://www.a-z-dictionaries.com/ starting point to find alternative database sources
9. http://www.pogona.net/wp/ another good tutorial
10. http://www.lingoes.net/en/ search for alternative databases
11. http://idpf.org/epub/ more information on how the add meta data to your book

You might also like