MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Amazon Kindle (https://www.mobileread.com/forums/forumdisplay.php?f=140)
-   -   Dictionary FAQ (https://www.mobileread.com/forums/showthread.php?t=131137)

papierflieger 01-13-2013 11:28 AM

Quote:

Originally Posted by Doitsu (Post 2380007)
Look for a free Korean-English StarDict or Babylon .bgl dictionary, convert it to a tab-delimited word list with PyGlossary and create your own Kindle dictionary using these instructions.

Thank you, that was really quick! I'm not exactly sure how to use PyGlossary, are there instructions for this somewhere? And I guess I'm going to have to find a windows pc to follow the instructions found in the second link, is that right? (because there are .exe files in the dictionary creator zip archive)

Doitsu 01-13-2013 12:26 PM

Quote:

Originally Posted by papierflieger (Post 2380066)
Thank you, that was really quick! I'm not exactly sure how to use PyGlossary, are there instructions for this somewhere?

If you have a Mac, you'll have to launch the Python GUI by either executing pyglossary.pyw in the src folder or pyglossary.sh in the root folder.

Quote:

Originally Posted by papierflieger (Post 2380066)
And I guess I'm going to have to find a windows pc to follow the instructions found in the second link, is that right? (because there are .exe files in the dictionary creator zip archive)

The instructions are indeed for Windows users, but if you know how to use the Mac shell you can also simply use tab2mobi.py to convert your tab-delimited file to a dictionary.

The command is: python tab2opf.py DICTIONARY.tab
If the source file is utf-8 encoded add -utf: python tab2opf.py -utf DICTIONARY.tab
(Obviously, you'll have to replace DICTIONARY.tab with the name of your tab-delimited Korean-English text file, which should be utf-8 encoded.)

This will generate Kindle source files that you'll need to compile by opening the .opf file with KindlePreviewer.

papierflieger 01-13-2013 12:36 PM

Quote:

Originally Posted by Doitsu (Post 2380152)
If you have a Mac, you'll have to launch the Python GUI by either executing pyglossary.pyw in the src folder or pyglossary.sh in the root folder.


The instructions are indeed for Windows users, but if you know how to use the Mac shell you can also simply use tab2mobi.py to convert your tab-delimited file to a dictionary.

The command is: python tab2opf.py DICTIONARY.tab
If the source file is utf-8 encoded add -utf: python tab2opf.py -utf DICTIONARY.tab
(Obviously, you'll have to replace DICTIONARY.tab with the name of your tab-delimited Korean-English text file, which should be utf-8 encoded.)

This will generate Kindle source files that you'll need to compile by opening the .opf file with KindlePreviewer.

Great, thanks for all the help! I'm going to try to figure this out when I have some time. :)

gouni 02-03-2013 06:53 AM

For windows use if the source file utf-8 encoded :

tab2opf.exe -utf dict.txt

nguyenvinh 03-20-2013 12:30 AM

Apparently there are a lot of problems with the dictionary support on the kindle fire
 
thank you very much

kledor 07-20-2013 06:07 PM

Hello everyone,
I'm having a problem with adding a dictionary to my Paperwhite, or more precisely, getting the Kindle to recognise the language.
I have books in 3 languages on my Kindle: my native, english and spanish. Problem is, spanish doesn't show up in the options awhere I should be able to set the default dictionary to a language. The books in question are from Amazon, so the metadata is right, but then why can't I see spanish among the languages?
Any help would be appreciated.

Doitsu 07-20-2013 07:08 PM

Quote:

Originally Posted by kledor (Post 2573985)
The books in question are from Amazon, so the metadata is right, but then why can't I see spanish among the languages?
Any help would be appreciated.

Many foreign language books on Amazon actually have the wrong language code. Double-check the language codes with the Java Mobi Metadata Editor and change them if necessary.

(If you installed a third party Spanish dictionary and cannot select it as dictionary, it was most likely compiled like a regular mobi book or has the wrong input/output language metadata codes.)

kledor 07-21-2013 06:03 AM

Quote:

Originally Posted by Doitsu (Post 2574019)
Many foreign language books on Amazon actually have the wrong language code. Double-check the language codes with the Java Mobi Metadata Editor and change them if necessary.

(If you installed a third party Spanish dictionary and cannot select it as dictionary, it was most likely compiled like a regular mobi book or has the wrong input/output language metadata codes.)

Thank you, I'll check it out as soon as I can.

edit: Okay, so the Mobi Meta Editor shows that it's in spanish (es-es 1034), I don't really know what to do with it now.

It is a third party dictionary, but it's from a Kindle site, I have another dictionary from there that is working properly.

Komo 07-26-2013 04:42 AM

Have you also checked (with the meta editor) that the book is set as a dictionary, not a regular book?

kledor 07-26-2013 01:01 PM

Quote:

Originally Posted by Komo (Post 2578586)
Have you also checked (with the meta editor) that the book is set as a dictionary, not a regular book?

Thank you, that solved the problem! The input language was set as english for some reason, now it's working.

nutki 08-16-2013 09:45 AM

Hi,
I am working on a custom dictionary for my private use with Kindle PW. Recently the firmware uptated and now the dictionary popup window has not just a few lines of plain text, but the actual formatted entry.
This is great change however I don't know how to control the amount of text that is show in the popup. Ideally it should end with the </idx:entry> tag, but actually it seems very random, showing partial or multiple entries (it is not a constant amount of text, the length varies). I though it is something with the input file I create, but I noticed the same happen with the build in English dictionary.

Anybody experiencing the same? Any ideas how to fix it?

PavelKaza 09-09-2013 05:31 PM

Hello
I have Kindle fire HD 7. version 7.4.6.root is ready.
I read book and tap on the word : show english properties. I would like show my language ( Czech)
I go to folder and at /etc/labdictionary/ODE_KCP.mobi - rw-r--r-- rename your file. old File is name ODE_KCP.mobi.bak
after I tap on word in the book and show havent dictionary.

Same dictionary file I use in Findle 3 keyboard and function is ready.

Why doesnt work in Kindle fire HD 7?
Where is problem ? Where I have something change?
thank you for help

Doitsu 09-09-2013 05:50 PM

Quote:

Originally Posted by PavelKaza (Post 2618688)
Where is problem ? Where I have something change?

AFAIK, the Kindle Fire behaves like the Windows app when it comes to dictionaries. I.e., it only supports the default monolingual English, French, Italian, German, Spanish, Portuguese and Japanese dictionaries.

In order to use a dictionary in a different language, you'll have to add the ASIN number of one of the default dictionaries, for example, B003WUYRGI for the ODE or B003ODIZL6 for the NOA, to your Czech dictionary with Java Mobi Metadata Editor.
(You'll also have to delete the corresponding English dictionary.)

You'll also most likely need to change the document language of your Czech Kindle books to English, if you add the ASIN of one of the English dictionaries to your Czech dictionary.

PavelKaza 09-09-2013 06:55 PM

HI
Quote:

Originally Posted by Doitsu (Post 2618710)
In order to use a dictionary in a different language, you'll have to add the ASIN number of one of the default dictionaries, for example, B003WUYRGI for the ODE or B003ODIZL6 for the NOA, to your Czech dictionary with Java Mobi Metadata Editor.
(You'll also have to delete the corresponding English dictionary.)

I must add line
113 B003WUYRGI
and working.
thank you very much :)

sevenkul 09-20-2013 05:43 AM

Quote:

Originally Posted by nutki (Post 2595681)
Hi,
I am working on a custom dictionary for my private use with Kindle PW. Recently the firmware uptated and now the dictionary popup window has not just a few lines of plain text, but the actual formatted entry.
This is great change however I don't know how to control the amount of text that is show in the popup. Ideally it should end with the </idx:entry> tag, but actually it seems very random, showing partial or multiple entries (it is not a constant amount of text, the length varies). I though it is something with the input file I create, but I noticed the same happen with the build in English dictionary.

Anybody experiencing the same? Any ideas how to fix it?

Try <idx:short>.

Code:

<idx:entry>
  <idx:orth>chair</idx:orth>
  <idx:short>a kind of seat.</idx:short>
  a seat for one person, which has a back, usually four legs and sometimes two arms
<idx:entry>

I also wonder if it works.

Doitsu 11-10-2013 07:23 PM

A Hungarian research project has extracted Wiktionary entries for 40 languages; the word lists in the Wiktionary folder are perfect for use with tab2opf.py or the binaries available at this site.
You can also convert these files to StarDict dictionaries with PyGlossary.
(The files names are based on ISO codes. For example, da_oc.txt = Danish-Occitan.)

Difermo 12-23-2013 03:37 PM

Need help!! What is wrong here

HarryT 12-23-2013 03:42 PM

Simply that you're not running it correctly. Try:

python tab2opf.py dic.txt

Difermo 12-23-2013 04:11 PM

Quote:

Originally Posted by HarryT (Post 2720428)
Simply that you're not running it correctly. Try:

python tab2opf.py dic.txt

I use all kind of comands. And try all combinations (where to place files and what files). I use bouth tab2opf.py and tab2opf.exe.

Here are some result
[img=http://www33.zippyshare.com/thumb/92566997/file.html][/img]

can you plz explain where to install python27, where to put all files (togather in one folder or not togather)!! Do I pleace all in python folder or no, to desktop or no!! I read this in forum from dictionary faq and how to create your.... and still nothing

HarryT 12-23-2013 05:03 PM

The fundamental problem is that you don't know how to use the command prompt. Before tackling this you really need to go back to basics and learn how to use it. Once you understand things like the current directory, search paths, etc, it'll all make sense.

Difermo 12-24-2013 12:11 AM

I made it. Found some tutorila (google), but have huge problem. I use this explanation
Code:

http://1manfactory.com/create-your-own-kindle-dictionary-for-every-language-for-free/
but every word is number. there is explanation for every word that is convertet to some kind of number. I download dictionary from dict.cc that was offered in that instruction.
What is problem? Can some1 create dictionary.mobi for me sou i can see is problem in dictionary.txt or "my softwares". Here is folder with script and mobigen etc..
Code:

dict.rar

Difermo 12-24-2013 06:35 AM

found solution "tab2opf.exe -utf dict.txt

Elsis 01-04-2014 07:31 PM

Kindle Touch and Swedish-English dictionary
 
Hi,

I would like to read books in Swedish with my Kindle Touch. However, Swedish is not my first language and sometimes there are words I don't know and it would be great to be able to tap the word in question and get it explained either in Swedish or in English. I thought this would be an easy thing to do but little did I know... I have tried to fix this for several days now and I'm getting desperate. So, please help me?

Here's what I have done so far:

1. I bought a Swedish-English dictionary (This one) and I have it on my Kindle.

2. I went to Settings > Device options > Language and Dictionaries >Dictionaries. There is only "English" on the list so I clicked it. In that section I'm able to choose between to dictionaries, the one I bought and one that was on my Kindle when I got it (Oxford dictionary of English). I chose the one I bought (An Electronic Swedish Dictionary).

3. I have a book written in Swedish on my Kindle (the meta of the book says the language is Swedish) When I'm reading it and I tap a word, my Kindle says "Dictionary not found. There are no dictionaries on your device for this book's language."

4. I changed the language of the book to English using Calibri. I also deleted the Oxford dictionary of English from my Kindle. (I figured that if my Kindle thinks that the Electronic Swedish Dictionary is an English dictionary, it would use it on my book if there was no other available options... Not sure if anyone can see any logic here! :D) --> This didn't work.

5. I used Calibri to change the language of the Electronic Swedish Dictionary to Swedish (suprisingly it was originally English in the meta). After changing the language I sent the dictionary to Kindle (in txt-format, using my @kindle.com address), but my Kindle doesn't recognize it as a dictionary anymore.

What can I do to solve this? There has to be some way to get Swedish words translated (or explained), right? What am I doing wrong? Is there something wrong with my device? My device language is English.

I have read that Sweden might become a "Kindle-country" in the near future. I guess that will solve my problem, but is there anything I do before that?

I would really appreciate your help. Thank you in advance!

Edit. I managed to change the language of the Electronic Swedish Dictionary to Swedish and transfer the dictionary back to my Kindle by USB. Now Kindle recognizes it as a dictionary, but it's still not working.

tomsem 01-05-2014 03:28 AM

You cannot send dictionaries via personal document service, they won't survive as dictionaries. You have to side load via USB cable, or download with browser.

Dictionaries have two language settings: one that defines the 'from' language, and another for the 'to' language. So to go from Swedish to English, one should be Swedish and the other English.

I'm not sure calibre is the correct tool to use for editing dictionary language metadata. I tried with one of my dictionaries and it doesn't show both language entries. I would use this tool instead:

https://www.mobileread.com/forums/sho....php?p=1927698

With the metadata fixed, and with the latest firmware update for Kindle Touch, if you go to Settings , Device Options, Language and Dictionaries, Dictionaries, it should show an entry for Swedish with the name of the dictionary below that. If you had other Swedish dictionaries you would be able to select one of them as 'default'.

The reason the metadata is not correct is that it didn't need to be prior to the K4 (basic Kindle) and Kindle Touch. Those kindles didn't pay attention to language, and you had to switch the global default dictionary to match what you were reading. The publisher really should update the dictionary to correct this, and you might contact Amazon to let them know of the issue. But fortunately you can change the metadata yourself pretty easily.

Kindle Touch should support Swedish fine in terms of rendering text and dictionary lookup. It should be okay for keyboard entry of Swedish characters as well, though there won't be any Swedish keyboard layout as such. But you can hold down the base character and choose the appropriate diacritic variant. I think it ignores diacritics for text search, in any case. There probably won't be any Kindle Touch updates to add Swedish as a UI language, but that's probably not an issue for you.

Doitsu 01-05-2014 03:34 AM

Quote:

Originally Posted by Elsis (Post 2730611)
What can I do to solve this? There has to be some way to get Swedish words translated (or explained), right? What am I doing wrong? Is there something wrong with my device? My device language is English.

According to some Amazon reviews, the dictionary that you bought doesn't work on a Paperwhite. Most likely there's a problem with the dictionary and not your device, but to exclude device problems, it couldn't hurt to reset it as this is known to fix some dictionary problems.

Some time ago, I created a free Swedish-English Kindle dictionary, which you can download from MR, and use for testing purposes. (It works fine on my K3.)

Simply download my dictionary, copy it to the \documents folder on the Kindle via USB, and test it on your Kindle Touch. (Delete your Swedish dictionary first.)
If the language metadata of your Swedish books is set to Swedish, it should show translations for the most common Swedish words, if you select a word in a Swedish book. (The dictionary has a limited coverage, try selecting common Swedish words.)

If Swedish dictionary lookup works with my dictionary, but not with the one that you bought, try re-downloading your dictionary from Amazon. If it still doesn't work, ask Amazon for a refund.

BTW, dictionaries also have input and output language metadata that you can only change with Java Mobi Metadata Editor.
You may want to check the input and output language metadata of your dictionary with Java Mobi Metadata Editor and change them if necessary. (The dictionary input language should be sv (1053).)

EDIT:
As tomsen has pointed out, it's important to transfer dictionaries via USB.

Elsis 01-05-2014 12:01 PM

tomsem and Doitsu, thank you for you help!

I converted the Electronic Swedish Dictionary to MOBI file and used the Mobi Metadata editor to change the input language to Swedish (and output to English). After that I used USB to transfer the dictionary to my Kindle --> My Kindle didn't recognize it as a dictionary anymore. I guess dictionaries can't be MOBI files?
I used Calibri to convert the file to AZW3. Then I transferred the Electronic Swedish Dictionary(AZW3) to my Kindle by USB, but it's still not recognized as a dictionary. What should I do?

NiLuJe 01-05-2014 12:11 PM

@Elsis: Do *NOT* convert it. Just tweak the metadata.

Elsis 01-05-2014 12:26 PM

Quote:

Originally Posted by NiLuJe (Post 2731117)
@Elsis: Do *NOT* convert it. Just tweak the metadata.

But how can I use Mobi Metadata editor to change the input language if the dictionary isn't a MOBI file? :huh:

Edit. I did it! The dictionary is now working perfectly! Thank you NiLuJe, Doitsu and domsem :)

CougarMellenhead 02-05-2014 11:32 PM

Hi. I'm new and have a quick question.

I'm working on a private dictionary (in .opf and then converting to .mobi) and would like multiple keywords to go to the same entry. For example, if there were an entry for "Steve and Jeff Smith", I would like searches for "Steve Smith", "Jeff Smith", and "Smith" to be directed to the entry for "Steve and Jeff Smith". Does that make sense?

I know there is a <idx:key> tag, but I'm not clear on how to implement it or even if it's what I want. And I did some google-fu and turned up blank.

Any help is much appreciated. Thanks in advance!

Doitsu 02-06-2014 03:33 AM

Quote:

Originally Posted by CougarMellenhead (Post 2756970)
Hi. I'm new and have a quick question.

I'm working on a private dictionary (in .opf and then converting to .mobi) and would like multiple keywords to go to the same entry. For example, if there were an entry for "Steve and Jeff Smith", I would like searches for "Steve Smith", "Jeff Smith", and "Smith" to be directed to the entry for "Steve and Jeff Smith". Does that make sense?

You can either wrap all search terms in <idx:orth>...</idx:orth> tags or define them as inflections. For more information see the Mobipocket website.

intangible 02-07-2014 10:38 AM

That's correct, but I'd add one thing: you can only wrap keywords in the exact form they appear in the entry. If you want them to be searchable in a different form (eg, "Steve Smith"), specify them in the value attribute instead:

Code:

<idx:entry>
<idx:orth value="Steve Smith"/>
<idx:orth value="Jeff Smith"/>
<idx:orth value="Smith"/>
<b>Steve and Jeff Smith</b>
...
</idx:entry>


CougarMellenhead 02-12-2014 12:39 AM

Thank you for your quick and helpful responses! I have one more question: How do I make it so that an image is aligned to the right of the text, with the text wrapping around the image (kind of like a picture in a newspaper article, if you understand what I mean)? I've tried this bit of CSS:

img {float: right; padding: 0 1.0em 1.0em 1.0em;}

which works fine in a web browser, but when I open the dictionary in my Kindle, the image is on the left and is above all of the text. :/

Thanks for any help you can offer!

Doitsu 02-12-2014 04:19 AM

Quote:

Originally Posted by CougarMellenhead (Post 2762251)
I've tried this bit of CSS:

img {float: right; padding: 0 1.0em 1.0em 1.0em;}

which works fine in a web browser, but when I open the dictionary in my Kindle, the image is on the left and is above all of the text.

Unfortunately, the Kindle dictionary code only supports HTML 3.2. This means that floats usually don't work. Try unpacking your dictionary with KindleUnpack to find out what inline styles KindleGen compiles your CSS to.

CougarMellenhead 02-12-2014 10:42 AM

You are very quick and helpful each time! Thanks so much for pointing me in the right direction.

For anyone that may be wondering how I got around using floats, I just made a very simple table with the text in one box and the image in an adjacent one. Like so:

<table><tr>

<td>text</td>
<td><img src="example.png"></td>

</tr></table>

It's probably not the most elegant solution, but it seems to work fine.

Once again, thanks for the help! If I have any more questions, I'm coming straight back to you. :]

JacquesTati 05-10-2014 08:51 AM

1 Attachment(s)
As you can see in the attachment, with the Kindle Paperwhite you can scroll through the various definitions of the word "match" (three in this case) by tapping on the arrow keys. This is not allowed on the Kindle Touch. Do you think it is possible to achieve the same function? Maybe, with a jailbreak.
My KT is updated to the last firware (5.3.7).
Thanks!

Doitsu 05-11-2014 03:20 AM

Quote:

Originally Posted by JacquesTati (Post 2827399)
As you can see in the attachment, with the Kindle Paperwhite you can scroll through the various definitions of the word "match" (three in this case) by tapping on the arrow keys. This is not allowed on the Kindle Touch. Do you think it is possible to achieve the same function? Maybe, with a jailbreak.

Unfortunately, the dictionary functionality is hard-coded in the Kindle firmware and there are even significant changes between the first and second generations of Paperwhites. Also, since the Kindle home-brew developers haven't figured out how to access the Kindle dictionary API, there's little chance of a dictionary hack.

JacquesTati 05-11-2014 07:34 AM

Quote:

Originally Posted by Doitsu (Post 2827902)
Unfortunately, the dictionary functionality is hard-coded in the Kindle firmware and there are even significant changes between the first and second generations of Paperwhites. Also, since the Kindle home-brew developers haven't figured out how to access the Kindle dictionary API, there's little chance of a dictionary hack.

I see. :sad2:
Thanks, Doitsu.

CougarMellenhead 05-13-2014 03:59 PM

I get a warning about having no cover image when compiling my .opf dictionary. How do I set a cover image?

Doitsu 05-13-2014 04:10 PM

Quote:

Originally Posted by CougarMellenhead (Post 2829714)
I get a warning about having no cover image when compiling my .opf dictionary. How do I set a cover image?

If you're using Mobipocket Creator, double-click the .opf file, then click Cover Image, drag & drop a cover image to the window and click Update.

If you created your .opf file manually, add the following line to the .opf file in the <x-metadata> section:

Code:

<x-metadata>
...
<EmbeddedCover>cover.jpg</EmbeddedCover>
</x-metadata>

(Replace cover.jpg with the name of your cover image.)

JacquesTati 05-21-2014 11:42 AM

1 Attachment(s)
Sometimes, tapping on the past participle of a verb, the look-up dictionary gives me the meaning of the noun only. Forgetting the verb one. This peculiarity happens from time to time, not always. Generally, as you know, there are those arrow keys which allow you to flip through the different meanings. Or the various definitions are one below the other and you have just to scroll the bar. But, every now and again, the arrow keys disappear, preventing you that. This happens with past participles only. In consequence, I am forced to go to ”more”, ”open dictionary” and find the meaning by myself. That’s quite irksome! And a waste of time, as well.
I was wondering if it’s possible — through a hack, maybe— to keep those arrow keys permanently there.
I’ve attached a screenshot as an example.
Thanks!


All times are GMT -4. The time now is 11:20 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.