Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 11-18-2012, 05:24 PM   #76
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,301
Karma: 337944
Join Date: Jun 2012
Device: kobo touch
My guess is "file:///mnt/onboard/.kobo/dict".
At least in the desktop application links to anchors in the same entry (<w>...</w>) work. I will try it tomorrow on the reader. That would already help me a little.

Last edited by tshering; 11-18-2012 at 05:41 PM.
tshering is offline   Reply With Quote
Old 11-18-2012, 05:41 PM   #77
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,301
Karma: 337944
Join Date: Jun 2012
Device: kobo touch
I did just another test with the desktop application. You can link to an anchor in a different html file by absolute path. Interesting thing is that the application opens this file as it is. That means, it must not be gz-compressed.

I thought that maybe the desktop application and the KT share the same code in displaying the dictionary entries and would therefore show a similar behaviour. But this seems not to be the case. I did not get any kind of links working.

Last edited by tshering; 11-19-2012 at 05:53 AM.
tshering is offline   Reply With Quote
Old 11-21-2012, 07:33 PM   #78
shutramp
Junior Member
shutramp began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2012
Device: kobo glo
Hey guys, keep up the good work! Appreciate it _a lot_ for I cannot do such things myself. And it helps very much having more dicts...

So if I may ask regarding a Chinese version again: if I understood tsherings explanations correctly and did not misread earlier posts about dict-crafting, a dict of the size of the CC-CEDICT would simply be an overkill with its more than 100.000 entries. At least with the current Kobo-dict system.

But I wonder if one could try to compile a very very basic dict for Chinese with only a few thousand html entries/files. Let's say single words/characters only, like "字" which would be then a "字.html"-file using the actual character for file-name. And there would be a file for every single character like "子.html" and "字.html" and "自.html" and so on. And every single file would only contain this one characters definitions, right? So then every html file itself would be very small too.

This would allow to at least look up the spelling and meaning of the basic few thousand single Chinese characters. And it would probably have a reasonable size. Or am I mistaken?

(And hopefully the matching/definition-pop-up would work just fine by means of the underlying Unicode/UTF-8 coding for every character? I know that the selecting and looking-up works for I have tried, but it lacks any result for definition right now. Oh and I would probably need to somehow make the ebook have let's say french as default language if the Chinese dict would be named as dicthtml-fr, to get the correct pop-up result, wouldn't I?)

Thank you for help and input!
shutramp is offline   Reply With Quote
Old 11-22-2012, 06:38 AM   #79
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,301
Karma: 337944
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by shutramp View Post
So if I may ask regarding a Chinese version again: if I understood tsherings explanations correctly and did not misread earlier posts about dict-crafting, a dict of the size of the CC-CEDICT would simply be an overkill with its more than 100.000 entries. At least with the current Kobo-dict system.
The problem is not the 100.000 entries. The problem is the great number of different characters. According to the current rules, a name of an html-file must consist of two!! characters (the first two characters of the definiendum/definenda contained in the file, or the first character plus "a" in case that the definiendum consists only of one character). I skip the finer details here. The CJK block of the unicode contains more than 20.000 characters. Granted that not each and every combination of two characters does actually occur in the language, the resulting number of needed files is nevertheless rather large.


Quote:
Originally Posted by shutramp View Post
But I wonder if one could try to compile a very very basic dict for Chinese with only a few thousand html entries/files. Let's say single words/characters only, like "字" which would be then a "字.html"-file using the actual character for file-name. And there would be a file for every single character like "子.html" and "字.html" and "自.html" and so on. And every single file would only contain this one characters definitions, right? So then every html file itself would be very small too.

This would allow to at least look up the spelling and meaning of the basic few thousand single Chinese characters. And it would probably have a reasonable size. Or am I mistaken?
This should be possible. The files have to be named "字a.html" and so on. 20.000 files should not be a problem. The maximum number of files in a zip file is about 65.500. I made a test with 14.000 files, and they worked perfectly.
I plan to split the Japanese dictionary into two parts. The first dictionary will contain words that start with one of the 2136 most commonly used Kanjis (resulting in 64.032 files), the second will contain words that start with Kana and depending on the number of resulting files maybe some more Kanjis. For Chinese you might perhaps do a similar split. The size of the individual files are not a big problem in this case. Maximum size of a zip file is 4 gigabytes.

Quote:
Originally Posted by shutramp View Post
And hopefully the matching/definition-pop-up would work just fine by means of the underlying Unicode/UTF-8 coding for every character? I know that the selecting and looking-up works for I have tried, but it lacks any result for definition right now. Oh and I would probably need to somehow make the ebook have let's say french as default language if the Chinese dict would be named as dicthtml-fr, to get the correct pop-up result, wouldn't I?
I guess you are right. One more thing: I am not sure whether all Chinese characters are supported by the Japanese fonts that the Touch/Glow uses. I would rather doubt it. However, this seems not to be a major problem as long as one can read the English definition.
tshering is offline   Reply With Quote
Old 11-22-2012, 07:57 AM   #80
gouni
Connoisseur
gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.
 
gouni's Avatar
 
Posts: 86
Karma: 546021
Join Date: Nov 2012
Device: kobo
hello,

I have a dictionary in the stardict format.

Can you make a clear tutorial for noob, step by step, please.

i am a beginner in Pc.

thank you.
gouni is offline   Reply With Quote
Old 11-22-2012, 01:11 PM   #81
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 891
Karma: 1642544
Join Date: Sep 2008
Device: Sony PRS-505 & PRS-650, Kobo Glo & Aura HD
Quote:
Originally Posted by gouni View Post
hello,

I have a dictionary in the stardict format.

Can you make a clear tutorial for noob, step by step, please.

i am a beginner in Pc.

thank you.
Windows or unix? There are some (minor) differences.
ShellShock is offline   Reply With Quote
Old 11-22-2012, 01:13 PM   #82
gouni
Connoisseur
gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.
 
gouni's Avatar
 
Posts: 86
Karma: 546021
Join Date: Nov 2012
Device: kobo
Windows seven family.

my level in computer is medium low.


Last edited by gouni; 11-22-2012 at 01:45 PM.
gouni is offline   Reply With Quote
Old 11-22-2012, 03:17 PM   #83
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,301
Karma: 337944
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by gouni View Post
I have a dictionary in the stardict format.
Since your source is in StarDict format you might consider waiting for AlPe's Penelope tool (cf. this post) for the first step of the process. Or maybe ShellShock comes up with something?
tshering is offline   Reply With Quote
Old 11-22-2012, 04:45 PM   #84
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 891
Karma: 1642544
Join Date: Sep 2008
Device: Sony PRS-505 & PRS-650, Kobo Glo & Aura HD
I have now written some detailed instructions on how to create your own Kobo dictionaries (see the attached HowToCreateKoboDictionaries.zip file). Be warned - you probably need some coding skills to convert your existing Stardict format into something that can be used to build the Kobo dictionary. I am not familiar with Stardict, so I do not know how easy this will be. I have had a quick look at it and it looks quite complex, definitely something you would want to right a converter program for.
ShellShock is offline   Reply With Quote
Old 11-23-2012, 03:22 AM   #85
gouni
Connoisseur
gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.
 
gouni's Avatar
 
Posts: 86
Karma: 546021
Join Date: Nov 2012
Device: kobo
Thank you, if it is too difficult for me. I'll wait for the utility of Alpe.

Thanks for your help ShellShock.
gouni is offline   Reply With Quote
Old 11-23-2012, 08:40 AM   #86
gouni
Connoisseur
gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.
 
gouni's Avatar
 
Posts: 86
Karma: 546021
Join Date: Nov 2012
Device: kobo
It is very difficult for me, but I progress.

I have found the software linguae.

I can convert my dict to ling preling sqlite dict xdxf tei wb csv ini bin and create table of index.

I have my index YES one point for me. I'm happy

I convert from xdxf.

If I rename it to html it is readable

If I rename it to txt I'll understand the structure and I never do that.

I put my cat on the keyboard

It has as much chance as I to convert to the kobo.

Last edited by gouni; 11-23-2012 at 09:30 AM.
gouni is offline   Reply With Quote
Old 11-23-2012, 12:16 PM   #87
ShellShock
Guru
ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.ShellShock ought to be getting tired of karma fortunes by now.
 
ShellShock's Avatar
 
Posts: 891
Karma: 1642544
Join Date: Sep 2008
Device: Sony PRS-505 & PRS-650, Kobo Glo & Aura HD
What does the html look like?

Last edited by ShellShock; 11-23-2012 at 12:54 PM.
ShellShock is offline   Reply With Quote
Old 11-23-2012, 01:21 PM   #88
gouni
Connoisseur
gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.gouni ought to be getting tired of karma fortunes by now.
 
gouni's Avatar
 
Posts: 86
Karma: 546021
Join Date: Nov 2012
Device: kobo
Quote:
Originally Posted by ShellShock View Post
What does the html look like?
This is a French dictionary I put some examples of words:



<ar><head><k>proscrire</k></head><def>● proscrire
verbe transitif
(latin proscribere, avec l&apos;influence de écrire)
Frapper de proscription.
Autrefois, condamner au bannissement.
Interdire quelque chose, en condamner l&apos;usage : Proscrire le café de l&apos;alimentation.
Littéraire. Chasser quelqu&apos;un d&apos;un groupe : Cette société dont on m&apos;avait proscrit.
● proscrire (difficultés)
verbe transitif
(latin proscribere, avec l&apos;influence de écrire)
Conjugaison
Comme écrire.
● proscrire (synonymes)
verbe transitif
(latin proscribere, avec l&apos;influence de écrire)
Frapper de proscription.
Synonymes :
- bannir
- exiler
- ostraciser
Interdire quelque chose, en condamner l&apos;usage
Synonymes :
- condamner
- exclure
- interdire
- prohiber
Littéraire. Chasser quelqu&apos;un d&apos;un groupe
Synonymes :
- écarter
- expulser
- rejeter</def></ar>

.
.
.
.

<ar><head><k>s'avachir</k></head><def>● s&apos;avachir
verbe pronominal
être avachi
verbe passif
Perdre de sa forme, de sa fermeté, devenir mou : Un fauteuil avachi.
S&apos;affaler : S&apos;avachir dans un fauteuil.
Perdre tout dynamisme, se laisser aller : Un être avachi, sans réaction devant la vie.
● s&apos;avachir (synonymes)
verbe pronominal
être avachi
verbe passif
Perdre de sa forme, de sa fermeté, devenir mou
Synonymes :
- déformé
- fatigué
- flasque
Contraires :
- frais
- neuf
S&apos;affaler
Synonymes :
- affaissé
- affalé
- s&apos;affaler
Perdre tout dynamisme, se laisser aller
Synonymes :
- aveuli
- mou
- ramolli
- se relâcher
Contraires :
- décidé
- dynamique
- énergique
- ferme
- résolu
- se reprendre</def></ar>

.
.
.
.
<ar><head><k>travailleur</k></head><def>● travailleur, travailleuse
adjectif et nom
Qui aime travailler : Un travailleur acharné.
● travailleur, travailleuse
adjectif
Littéraire. Qui appartient au monde du travail, des travailleurs : Masses travailleuses.
● travailleur, travailleuse
nom
Personne qui se livre à un travail rémunéré, salarié, en particulier dans l&apos;industrie.
● travailleur, travailleuse (expressions)
nom
Jeune travailleur, travailleur qui, compte tenu de son âge, est soumis à des réglementations particulières s&apos;agissant de l&apos;insertion professionnelle (facilités d&apos;accès à l&apos;emploi) et des conditions de travail. (Des règles dérogatoires s&apos;appliquent notamment en matière de contrat de travail.)
Travailleur étranger, travailleur qui, compte tenu de sa nationalité, est soumis à des conditions restrictives d&apos;accès à l&apos;emploi salarié (détention d&apos;un titre de séjour et de travail). (Ce principe ne s&apos;applique pas aux ressortissants de l&apos;Union européenne.)
Travailleur social, personne dont la fonction consiste à apporter une aide, à rendre service aux membres d&apos;une collectivité, d&apos;un établissement (assistante maternelle, assistante sociale, éducateur spécialisé, etc.).
Travailleuse familiale, personne dépendant des caisses d&apos;allocations familiales et qui assure à domicile une aide aux mères de famille momentanément en difficultés familiales, financières.
● travailleur, travailleuse (synonymes)
nom
Travailleuse familiale
Synonymes :
- aide familiale</def></ar>

Last edited by gouni; 11-23-2012 at 01:26 PM.
gouni is offline   Reply With Quote
Old 11-23-2012, 02:12 PM   #89
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,301
Karma: 337944
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by ShellShock View Post
I have now written some detailed instructions on how to create your own Kobo dictionaries (see the attached HowToCreateKoboDictionaries.zip file).
Thank you very much for providing the marisa binaries for windows and for the instructions.

Especially, writing the instructions must have been a lot of work. If you don't mind I would like to suggest two small changes in order to make them even more useful.

The description of which words go into the 11.html file might easily be misunderstood. Actually, a word/expression goes there if the first or/and second character is not a letter. Examples for the second character being not a letter are <a name="I'd">, <a name="o'clock">, <a name="T4 cell">.

Maybe it would be good to shift the whole explanation about CR and LF to point 3. I do not think that CRs in the html prevent correct processing or displaying, and they have no connection with the index file. On a side note, in the original dicthtml, CR and LF are both omitted, presumably because of performance concerns.

Thank you again for your hard work.
tshering is offline   Reply With Quote
Old 11-23-2012, 02:41 PM   #90
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,301
Karma: 337944
Join Date: Jun 2012
Device: kobo touch
gouni, You can try this:

replace <ar><head><k> by <w><a name="
replace </k></head><def> by "/>
replace </def></ar> by </w>

To get minimal formatting replace line breaks by <br/>

Please give my regards to your cat!

Edit: replace any resulting </w><br/> by </w>

Last edited by tshering; 11-23-2012 at 02:46 PM.
tshering is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What's file format of dictionary mnjkl Kobo Reader 2 12-12-2011 08:48 AM
Dictionary format jgray Sony Reader 1 10-25-2010 09:52 AM
English Thesaurus in the dictionary format osnova Amazon Kindle 14 12-12-2009 06:42 PM
Dictionary: what version? can it be in firmware? jedix Sony Reader Dev Corner 7 12-05-2008 12:00 PM
Webster dictionary in DEPReader format abigail Reading and Management 0 08-10-2005 08:00 AM


All times are GMT -4. The time now is 11:23 AM.


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