View Single Post
Old 11-15-2012, 05:05 PM   #65
ShellShock
Wizard
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: 1,176
Karma: 2431850
Join Date: Sep 2008
Device: IPad Mini 2 Retina
I have solved the mystery of why word lookup in my custom dictionary was not working - I could not look up any words shorter than 4 characters. Also marisa-lookup always returned -1 no matter what.

I had to get up close and personal with Marisa, the naughty thing, and put her through a debugger. This showed that all my keys had a carriage-return on the end. Ah ha - Marisa only plays nice with Unix, the hussy! After stripping all my carriage-returns (leaving just newlines) from my index.txt file, Marisa was much happier, and my new dictionary is now fully working.

I have also discovered that the html input files can have multiple <p> elements per <w> element, if you have multiple definitions for the same word, e.g.,

Code:
<w>
<p><a name="a"/><b>a</b>, the indefinite article</p>
<p><a name="a"/><b>a</b>, ä, a dialectic corruption of <i>he</i> or <i>she</i></p>
</w>
On the Kobo, the multiple definitions will be displayed on the same page, with a blank line between them.

The Chambers dictionary I used as my source only has 33,000 definitions (but I like them!), so I am going to look for something a bit more substantial to convert to the Kobo.
ShellShock is offline   Reply With Quote