Sorry about the delay in getting back to you. I've been pretty busy, and
it's only gonna get worse - I'll be starting work next week.
I've finished my indexing, but now I need your help to create a large
dictionary so I can see how it performs. If I understood correctly a few
weeks ago, you said that the PDB file cannot exceed 64KB. That's not going
to hold very many dictionary entries. Have you guys got any ideas about how
to make bigger databases?
I've attached a HTML file and one JPG describing what I've done, but here it
is in brief:
The dictionary has no special data - at the moment it's just the raw data.
We may want to change that, particularly if we're hoping to do two-way
There's a separate index file which stores references to the dictionary
entries - that means that the dictionary and the index have to be made for
each other on the desktop. The index file is sorted by kana order. Each node
takes up 8 bytes:
key - WChar - the indexing character
child - UInt16 - the array index (into the index PDB) of this node's first
sibling - UInt16 - the array index (into the index PDB) of this node's
entry - UInt16 - the array index (into the dictionary PDB) of the
To find an entry, look for the first character among the root node's first
child and its siblings. If you get a match, look for the second character
among that node's first child and its siblings. And so on. When you reach
the end, if the current node has a valid "entry" index then fetch that entry
from the dictionary PDB.
I've optimised this to save space, at the expense of lookup speeds. I'm
guessing that the lookup speed will still be acceptable, but I need to test
I tried coming up with all kinds of clever indexing schemes to squeeze the
last bit of value out of every bit of storage space, but in the end I
decided that it probably wasn't worth the complications.
If you want my source then let me know, but the zip files come to 218KB for
the desktop and 108KB for the Palm application.