Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-27-2011, 03:07 AM   #1
sjheiss
Connoisseur
sjheiss began at the beginning.
 
Posts: 58
Karma: 26
Join Date: Dec 2011
Device: K3G, KF2
Need help to create a dictionary

I've been trying for hours to figure out how to decrypt the Oxford Dictionary of English, but all the ways to decrypt books seem to be out of date. I want to decrypt it so I can use it as an example to create a dictionary just like it, out of some HTML files/a delimited text file of a Basque dictionary. I've tried making the dictionary myself, but the only guide I could find relies on StarDict files, TAB files specifically, and I can't get those since my dictionary is not a StarDict one, rather from a CHM file compiled from a website. The post says that tab2opf.py can use TXT files, but if you try it says that it requires TAB.

I could easily create a PDF or similar, and I have, but I want it to function like the two dictionaries that come pre-installed on Kindles (on my K3G at least).

Mobipocket won't work, because if I try to build a file with a table of contents, it says that the hyperlink(s) were not resolved.


I've tried almost everything I can think of, and my brain hurts so much from doing this and other Kindle hacks and things for over 12 hours straight, and my attention span is extremely short because of that.

So, I'd be extremely thankful if someone could tell me something I could do to get what I desire, or to complete it for me (although I prefer learning to do it myself.
sjheiss is offline   Reply With Quote
Old 12-27-2011, 03:37 AM   #2
osnova
Kindler of the Flame
osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.osnova ought to be getting tired of karma fortunes by now.
 
osnova's Avatar
 
Posts: 582
Karma: 646016
Join Date: Oct 2009
Location: US of A
Device: K DX,3,KT,KP,KF, KFHD; Nook C, PRS600, iPad, Xoom, N900, N810, Zaurus
We can't help you break DRM on the Oxford Dictionary, but what you need is:

http://www.mobipocket.com/dev/articl...e=indexing.htm
They also have an sample dictionary there for download.


Example of a very basic article from OSNOVA edition of ISBE:

Code:
<idx:entry><idx:orth><a name="FAR HOUSE"><h2>FAR HOUSE</h2></a></idx:orth>
	<p>The marginal explanation in the Revised Version (British and American) of Beth-merhak (beth ha-merchaq, "house of distance"), which is given in the text of <a href="#2Sam.15.17">2Sa 15:17</a> instead of "a place that was far off."</p>
	<p>See <a href="#BETH-MERHAK">BETH-MERHAK</a>.</p></idx:entry>
When you compile you have to identify it as a dictionary. Also note that Kindle Fire and software Kindles don't let users select a non-Amazon dictionaries as a default dictionary.

If your head hurts trying to figure out the Mobipocket format, read the Mobipocket tutorials on their site and this book. I am not affiliated with the author but like this work even though it is dated.

Oh, and there is no point in using toc.ncx with dictionaries (if you get a red error from unresolved links, it may be because of a link in toc.ncx leading nowhere, yellow warnings you could ignore at the beginning and then you need to fix them before publishing) because Kindle ignores it anyway for dictionaries. Dictionaries use the index function. You can make a hyperlinked TOC at the beginning of the book.

Last edited by osnova; 12-27-2011 at 03:47 AM.
osnova is offline   Reply With Quote
Advert
Old 12-27-2011, 10:03 AM   #3
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by sjheiss View Post
I could find relies on StarDict files, TAB files specifically, and I can't get those since my dictionary is not a StarDict one, rather from a CHM file compiled from a website.
You don't have to use tab2opf.py. Since .chm source files are .html files, you could use Microsoft HTML Help Workshop to decompile the .chm file and do a global search and replace to create .html files that you can compile with Mobipocket Creator.

A dictionary entry must be enclosed by <idx:entry> and <idx:orth> tags.
(<a name/> tags are only required if the dictionary contains cross references.)

A minimal Mobipocket dictionary source file with two entries looks like this:

Code:
<html>
	<body>
   
		<idx:entry>
			<a name="apurtu">
			<idx:orth>apurtu</idx:orth><br />
			to break, smash, shatter 
		</idx:entry>
		<hr />

		<idx:entry>
			<a name="adiskide">
			<idx:orth>adiskide</idx:orth><br />
			friend 
		</idx:entry>
		<hr />

		<!-- more entries-->

	</body>
</html>
If you format your dictionary in this way, Mobipocket Creator will automatically create a search index.
For more information on dictionary source files, see the Mobipocket Developer Website.

Last edited by Doitsu; 12-27-2011 at 03:12 PM.
Doitsu is offline   Reply With Quote
Old 12-27-2011, 01:57 PM   #4
sjheiss
Connoisseur
sjheiss began at the beginning.
 
Posts: 58
Karma: 26
Join Date: Dec 2011
Device: K3G, KF2
Thanks for the replies! I cannot test anything right now since I am on my kindle
(first time I have had my own internet access everywhere!) but especially Doitsu's
post seems very promissing. It should not be hard to format the file like that I think.
sjheiss is offline   Reply With Quote
Old 12-30-2011, 09:35 PM   #5
iatheia
Zealot
iatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmosiatheia has become one with the cosmos
 
Posts: 139
Karma: 21754
Join Date: Mar 2011
Device: Kindle 3, Icarus Illumina XL, Boyue T62
http://www.the-ebook.org/forum/viewtopic.php?t=15767 - A thread on Russian forum dedicated to dictionaries creation. There are plenty dictionaries already converted, as well as a script for converting dsl dictionaries to mobi
iatheia is offline   Reply With Quote
Advert
Reply

Tags
dictionary, mobipocket


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to create your own mobipocket dictionary for any language: drago Workshop 175 03-24-2020 03:48 PM
create dictionary from scratch Gianni Amazon Kindle 0 05-26-2011 08:29 AM
Dictionary question: changing word delimiters for french dictionary oecherprinte Amazon Kindle 1 05-09-2011 04:45 AM
Oxford built-in dictionary disappears after changing default dictionary YYZscientist Amazon Kindle 4 01-24-2010 08:42 PM
How do I create headword-enabled Mobipocket dictionary? owl123 Kindle Formats 1 07-24-2009 11:13 AM


All times are GMT -4. The time now is 04:45 AM.


MobileRead.com is a privately owned, operated and funded community.