Mobileread
How to create your own mobipocket dictionary for any language:
#1  drago 02-12-2008, 06:17 AM
I was very gratefull to Adam B for porting the Stardict dictonary tool for the Iliad, but I allways longed for the kind of instant lookup, which is possible from mobipocket. Unfortunately mobipocket dictionaries are not available for more exotic languages, so I allways wanted to create my own mobipocket dictionaries. It seems I have now found a solution:

First you need to get hold of a tab delimited dictionary file. (example. dictionary.txt)

(Stardict dictionary files are available from: http://stardict.sourceforge.net/Dictionaries.php
These can be converted into a tab delimited file by the stardict editor programe, which you can find here: http://stardict.sourceforge.net/other.php )

Once you have such a file, use tab2opf.py from http://www.klokan.cz/projects/stardict-lingea/
This is a free python script by Petr Klokan, so you’ll need python isntalled.

Type tab2opf.py dictionary.txt into the command line to run the script.

This will give you a dictionary.opf file, and a number of dictionary0.html files

Edit the dictionary.opf file, to specify the name of the dictionary, and the impot output languages.

Get mobigen.exe form - http://www.mobipocket.com/soft/prcgen/mobigen.zip

Extract mobigen exe

Run mobigen.exe dictionary.opf

If you did everything right, you’ll get dictionary.mobi which’ll be the desired mobipocket dictionary.

Cheers!

D.
Reply 

#2  templario 02-12-2008, 06:33 AM
That´s very interesting and helpful. Thanks for sharing. Just one question, can this be done in a windows machine?

Thanks
Reply 

#3  drago 02-12-2008, 06:44 AM
Templario,

yes, I have done it on a win machine. Stardict editor has a win version, python can be instaled for windows, and mobigen. exe is windows only.

Btw. it seems mobigen.exe runs under wine as well, so this can also be done on a Linux box.

Cheers!

D.
Reply 

#4  ericshliao 02-12-2008, 06:57 AM
Mobipocket Reader on iLiad still have problem displaying non-western glyphs, such as Chinese glyphs. I think Japanese and Korean glyphs are no exception.


Edited:
With proper modification, CJK glyphs can be displayed on Mobipocket Reader. See this:
http://forum.irexnet.com/viewtopic.php?t=2281
Reply 

#5  hellosim 02-13-2008, 02:48 AM
I followed your step in winXP.

installed stardict3.0, installed GTK2 Runtime, downloaded dictionary files, extracted with 7zip, run stardict editor.

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?
Reply 

#6  drago 02-13-2008, 06:02 AM
This happened to me as well. 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 sametypesequence not m, but after changing the sametypesequence=x line in the ifo file to sametypesequence=m it decompilled.

Good luck!

D
Reply 

#7  ericshliao 02-15-2008, 01:03 AM
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.
Reply 

#8  drago 02-16-2008, 03:07 AM
Update: creating the dictionaries with Mobipocket Creator Publisher Edition gave better and more consistent results than using the command line mobigen.exe.
Get it from:
http://www.mobipocket.com/en/DownloadSoft/DownloadCreator.asp?edition=Publisher

Create new publication
----create presonal dictionary-glosary
important: specify the language, and select the input-output languages at the book-setting tabs, without this, instant lookup won't work. (Also I got the best results with unicode encoding.)
drop all the numbered .html files created by the tab2opf.py (leave they .opf file alone)
click on build

Enjoy!

D.
Reply 

#9  wagnerian 02-25-2008, 01:34 AM
I have built a yet another tab2mobi script because the tab2opf.py does not support Asian characters.

Install BeeLiner first:
http://wing4bee.tistory.com

And put this script package and mobigen.exe into the directory where BeeLiner is installed.
Modify the MyDict.opf file and run:
tab2mobi.cmd your_source_file.txt
[zip] tab2mobi.zip (12.5 KB, 2405 views)
Reply 

#10  ericshliao 02-25-2008, 08:13 AM
By my experience, with a "-utf" option, the original tab2opf.py can deal with Chinese characters.
Reply 

  Next »  Last »  (1/18)
Today's Posts | Search this Thread | Login | Register