So this is my first hack at trying to add a Guacuno language dictionary to my Kindle App 6.32.1 on my IoS 13.5.1. I’m working from a Windows 10 box with Python 3.6.3 already installed.
First, I had to create a dictionary of keywords on the left and definition(s) on the right separated by a tab. I did this in Open Office spreadsheet and saved it in CSV format using the other filter and the “:”, which I had used in the original document.
Addendum: I generated the spreadsheet from Polyglot. I edited the columns in a format of <part of speech> (pronunciation) definition. I wanted the part of speech as italics. It is ok to add <i>part of speech</i> as the generated code is html-based.
I’m not sure about the “:”, I generated using tab-delimited and quoted strings.
One bonus gotcha. I had strings with quotes in them. Nested quotes render as “” so I went and replaced them all with single quotes.
Second, I ran a python program called tab2opf.py obtained from [https://github.com/apeyser/tab2opf]. The readme file explains the optional parameters but suffice it to say that the source is Guacuno and the target is US English.
Addendum: If you have UTF characters, the tab2opf.py will gag on them. I found and replaced mine using Notepad++ in UTF-encoding so I could see the hex characters.
> py .\tab2opf.py -v -s Guacuno -t en-us .\GuacunoDictionary.txt
This program compiles the tab-delimited files into HTML and OPF files. These are text-based files that possibly could be further edited to make the dictionary look better, but I will wait until the dictionaries are more mature since I don’t want to be maintaining multiple files.
Third, I ran a program called “kindlegen.exe” to generate a Mobi file from the OPF file obtained from [https://www.amazon.com/gp/feature.html?ie=UTF8&docId=1000765211].
> .\kindlegen.exe .\GuacunoDictionary.opf
This creates a *.mobi file.
And finally, I mailed the dictionary Mobi file to my IoS phone and exported it from mail into the Kindle App. In my Kindle library, I had to make sure that the dictionary is actually imported into the app by tapping on it in the library. From there, you can use the app on any word in the reader by selecting a word and changing to the Guacuno dictionary.
Regrettably, I can find no way to make the selection permanent, as Kindle always resets to your install default dictionary.
Addendum: Here is the link. https://drive.google.com/file/d/1Wf0MEkQmJWf736Gd6ekNdlNS_aR6IBNq/view?usp=sharing