Mobileread
Mobigen How do you prevent headword-inflected form conflict in a Kindle dictionary?
#1  mobidict 05-31-2022, 01:38 PM
I've created a dictionary and when I look up a word that is a headword and at the same time an inflected form of another headword, only the former shows up due to conflict and the latter won't show up. How can I prevent it?

For example if I look up "saw" in the dictionary, "see(perceive with the eyes)" headword will be ignored even though I have provided "saw" as an inflection of "see", and "saw(a hand tool for cutting wood or other materials)" will show up.

How can I make sure that both meanings can be looked up? I used <idx:infl> tags for inflected forms, here:

Code
<idx:entry name="word" scriptable="yes" spell="yes">	<b><idx:orth>see	<idx:infl>	<idx:iform value="saw"/>	</idx:infl>	</idx:orth> </b>	<i>verb</i> <br/>	perceive with the "eyes	</idx:entry>
<br/><br/>
<hr/>	<idx:entry name="word" scriptable="yes" spell="yes">	<b><idx:orth>saw	<idx:infl>	<idx:iform value="saw"/>	</idx:infl>	</idx:orth> </b>	<i>noun</i> <br/>	a tool used to cut wood
</idx:entry>
<br/><br/>
<hr/>
Reply 

#2  jhowell 06-02-2022, 08:07 AM
Unfortunately there is very little documentation on dictionaries from Amazon or from Mobipocket before them. My understanding of how they work is incomplete. But since no one else has answered this question I will take a stab at it.

Orthographic entries are stored in an index. That makes them quick to look up but they use a lot of storage. Inflections are stored as a set of rules. That allows them to use less storage, however looking them up is costly in time and battery usage.

When a user looks up a word in a dictionary the orthographic index is checked first. If the word is found there the results are presented and no further lookup is done. Because a single word can have multiple entries in the index this lookup can return multiple results which are all presented to the user.

Inflections are processed using the rules only if the word is not found in the orthographic index. Once an inflection is found searching stops and a single result is presented. Even if the word is an inflection for several different entries only one result will be shown.

So if you want "saw" to be shown as both a tool and the past of "see" you need separate orthographic entries in the dictionary to cover both of those cases.
Reply 

#3  Hitch 06-06-2022, 12:39 PM
Quote jhowell
Unfortunately there is very little documentation on dictionaries from Amazon or from Mobipocket before them.
There's the understatement of the decade....

But I know that you make every damned effort to bring it into the light, jhowell and I and others thank you for it.



Hitch
Reply 

Today's Posts | Search this Thread | Login | Register