0

I'm developing a custom Bulgarian Dictionary for Kindle, in .mobi format (source code is here: https://github.com/yanosh-k/bulgarian_dictionary). I've manged to successfully create a working version, but I'm having a problem. The dictionary is case sensitive. I'm not sure if this is due to the language and the encoding or is there some setting that I've overlooked, while generating the .mobi file.

My process for generating the .mobi file is the following:

  1. Generate a list of the words, their meaning and inflections, that I want to be in the dictionary. The list is generated from a SQL database and is stored to a plain text file. The text file is UTF-8 encoded, having Unix line endings (LF), and the data is tab delimited in the following format: wordTabword idTabhtml formatted word meaningTabcomma separated list of inflections. Each line in the file represents a word. The latest version of the file can be found here: https://github.com/yanosh-k/bulgarian_dictionary/blob/master/bulgarian_dictionary.txt (27.1 MB).
  2. Generate an OPF file. This is done using a customized version of the tab2opf python script (my version is here: https://github.com/yanosh-k/bulgarian_dictionary/blob/master/convertors/tab2opf.py, and the original: https://github.com/apeyser/tab2opf). The latest version of the file can be found here: https://github.com/yanosh-k/bulgarian_dictionary/tree/master/opf.
  3. Use kindlegen to convert the .opf file to .mobi file. (Amazon took off the official version from their website, so I use a copy from the Internet Archive: https://archive.org/details/kindlegen2.9)
  4. After the .mobi file is generated, it can be directly uploaded to a Kindle device and used.

This works great but when I try to select a word, while reading a book on my Kindle, it does not recognize words that start with a capital letter, or words that all capitalized. For example the word старик would be recognized by the dictionary, but when the first letter is capitalized, like so Старик, it says that no such word was found.

Is this an intended behavior? Should I include all versions of capitalization in the inflected list? And is there a way to make it case-insensitive?

The information that I've used, to derive the whole process comes from here:

  1. https://1manfactory.com/create-your-own-kindle-dictionary-for-every-language-for-free/
  2. https://s3.amazonaws.com/kindlegen/AmazonKindlePublishingGuidelines.pdf
1
  • I don't use Kindle so I cannot give you a precise answer. But first of all, what happens if you search a capitalized word on another "official" book? (I assume that you are searching for Старик and you did not find any result since your dictionary contains старик)
    – mau
    Mar 10 at 17:31

2 Answers 2

0

Here is a python script I just created that converts from a word list stored in MySQL into a Kindle dictionary for the Palauan language: https://github.com/tekinged/tekinged.com/blob/main/scripts/mk_kindle_dict.py

0

I've rewritten the whole back-end for .opf generation and that seems to fix the issue.

Two things, that I've change, might have been the reason for this success (this is not confirmed, I'll followup when I have more information):

  • reformatting the templates for the .opf and .html files (removing unnecessary spaces and newlines)
  • using UTF-8 BOM in the templates

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.