View Single Post
Old 03-03-2013, 07:49 AM   #3
totsubo
Member
totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.totsubo ought to be getting tired of karma fortunes by now.
 
Posts: 22
Karma: 475242
Join Date: Nov 2012
Device: Kindle Paperwhite
Quote:
Originally Posted by Doitsu View Post
Try this:

Code:
<idx:entry>
	<idx:orth value="頭">
		<idx:infl><idx:iform value="首"/></idx:infl>
	</idx:orth>
	<h3>頭 【あたま】首 【あたま】</h3>
	【あたま; かしら; かぶり; こうべ; ず; つむり; つぶり; つむ; かぶ】<br />
	(noun) (1) head; (2) mind; brain; intellect; (3) top; (4) hair (on one's head); (5) bangs; fringe; (6) top structural component of a kanji<br />
</idx:entry>

This defines 首 as a variant of 頭 and looking up either of these Kanjis will display the same entry.
Doitsu, thanks for the reply!

Perhaps I didn't quite explain what I wanted to do. I'll try and explain more clearly.

The issue I have is not with what the dictionary entry/definition displays, it's with what is displayed in the index list.

By this I mean when a user has the dictionary already opened and does a search within the dictionary. When you do this the Kindle displays a list of all the index entries (in alphabetical order).

[If this is still not clear let me know and I will try and upload screen shots]

Currently I have this code:

Code:
<idx:entry name="word" scriptable="yes">
  <h3>頭</h3>
  <idx:orth>頭</idx:orth>;
  <idx:orth>首</idx:orth>
  【あたま; かしら; かぶり; こうべ; ず; つむり; つぶり; つむ; かぶ】<br />

(noun) (1) head; (2) mind; brain; intellect; (3) top; (4) hair (on one's head); (5) bangs; fringe; (6) top structural component of a kanji

<br />
</idx:entry>
<hr />
<br />
Functionally this works, looking up either 頭 or 首 will bring up the entry. The difference being that my approach will display 首 in the index list but bring you to the entry for 頭 while your suggestion of using inflections will display 頭 in the index list. (*)

The problems is that in the index, what is displayed is 頭 (and only that). I would like to display the kanji *and* the reading when the index list is being displayed. In other words I would like this displayed "頭 【あたま】"

I can't find anyway of doing this that doesn't break the index. I know it can be done though because the 大辞典 dictionary that comes free with the Kindle Paperwhite does just that ...

Any suggestions are most welcomed!

(*) In case where an entry has more than one possible kanji I'm having difficulty deciding if I should use my method of multiple orth's or use inflections instead. With inflections users could get confused when doing an in-dictionary index lookup - the user is looking for 首 and the index shows 頭. Unless you already that one is an inflection of the other it can be confusing.

On the other hand, using multiple orth's also has a big drawback. 首 is an inflection (alternate writing) of 頭, but it *also* has it's entry (neck) which unrelated to 頭! Doing an index lookup will display two entries for 首, which I can live with. The issue comes up when doing a look-up when reading a book. If you look-up 首, the Kindle will jump to the entry for 頭 (head) which is incorrect ... it should have gone to 首 (neck).
totsubo is offline   Reply With Quote