1

I'm writing a program that will automatically sort the index of a Japanese book and group the terms under the associated Japanese letter. I have found numerous instructions, but I'm still unsure how to do it correctly.

I know we need the phonetic translation of a term in order to sort it. So far so good. Since it is possible to write the phonetic translation using hiragana or katakana, which of these characters do I use for sorting?

If say my terms are mixed i.e. the phonetic translation starts with hiragana and katakana letters, do I assign the index terms to the matching hiragana group letter or the matching katakana group letter?

Example: do I place よ terms under the index group letter ヨ? If yes, can I always assign hiragana terms to the associated katakana group letter? I.e. my index will only use katakana grouping letters.

Thanks for any help.

Best regards,

Robert

1
  • I just use perl's Unicode::Collate, which implements the Unicode Collation Algorithm.
    – user1478
    Commented Nov 18, 2014 at 22:17

2 Answers 2

1

There's basically a one-to-one correlation between hiragana and katakana.

The two main exceptions that I'm aware of are:

in how long vowels are transcribed.

For katakana, a dash-like element is preferred. For hiragana, the character for either o or u is used (often for historical reasons as the pronunciation of the long vowel sound for o is identical at this point).

in the use of certain katakana for foreign words

Particularly, I'm thinking here of V/B sounds where the v is often written as the "u" character plus a phonetic mark. These should not be sorted together with the unmarked group. (e.g., デイヴィス for Davis)


maybe not "so far so good" on the kanji -> kana

Kanji to kana conversion is harder than it might seem. Automated output is almost guaranteed to have trouble with characters that can be read in multiple ways. For instance, depending on context, 今日 is either こんにち or きょう. People's names are even worse.

For church for instance, we use a furiganizer to help a friend whose Japanese reading level is pretty bad. But the furiganizer is often very wrong:

Consider "Sabbath" [安息]{あんそく}[日]{??}. The last character can be read [じつ]{jitsu}, [び]{bi}, or [にち]{nichi} and the different translations don't even agree.

or

"lord" 主 which can be read [ぬし]{nushi} or [しゅ]{shu}


All of this makes is so that sorting in Japanese is a relatively difficult problem. It's also not agreed upon how to resolve this problem. For an interesting thread, see https://groups.google.com/forum/#!msg/django-users/IasBBYb7UoU/bQiXbowZl8cJ which suggests converting everything to hiragana and using gojyuuon. The method there advocates converting the katakana long vowel sound in most contexts to the conventional hiragana (which varies depending on the preceding vowel).

1
  • @senshin I don't know the answer to that... I'm just telling the OP where there are two potential problems with trying to merge hiragana and katakana to sort...
    – virmaior
    Commented Nov 18, 2014 at 22:11
0

Since it is possible to write the phonetic translation using hiragana or katakana, which of these characters do I use for sorting?

Considering the fact that hiragana and katakana are, as virmaior already said, in a one-to-one correlation, I think it will be better to consider the sound they're representing as a sorting criterion, not the graphic representation as hiragana or katakana.

For example, in 角川新国語辞典 (2007, page 1292) the words are sorted in the following manner: we know that ら = ラ = ra, so we have らいらく (rairaku) , ライラック (rairakku) and then らいりん (rairin) and nobody says nothing about the fact that the hiragana words are mixed with the katakana ones.

do I assign the index terms to the matching hiragana group letter or the matching katakana group letter?

Probably I should add that in 角川新国語辞典 the exemplified words are indexed under the ら label (hiragana). But I think you should use the kana that represents the majority of the title phonetic translations (if most of the titles can be written in hiragana, use hiragana, else use katakana).

N.B. If the sorted list is the answer to a search operation, you must give the user the possibility to make his query in hiragana, katakana or romaji and still get the right ordered list. For the previous example, if I would type らい, ライ or rai I should be able get the same list (らいらく, ライラック and then らいりん) unless I choose not to.

2

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .