perl-i18n

RE: ordering Japanese

2006-05-04 20:40:32
Thanks for the reply. And yes, that's the explanation that I got from my
client - that the ordering should be based on the pronunication of the
Japanese and then based on this ordering:

A I U E O
Ka Ki Ku/Qu Ke Ko (Ca Ci Cu Ce Co if the sound is "K")
Ga Gi Gu Ge Go
Sa Shi Su Se So (Ca Ci Cu Ce Co if the sound is "S")
Ja Ji Ju Je Jo
Za Zi Zu Ze Zo
Ta Ti Tu Tsu Te To
Da Di Du De Do
Na Ni Nu Ne No
Ha Hi Hu He Ho
Va Vi Vu Ve Vo
Pa Pi Pu Pe Po
Fa Fi Fu Fe Fo
Ba Bi Bu Be Bo
Ma Mi Mu Me Mo
Ya Yi Yu Ye Yo
Ra/La Ri/Li Ru/Lu Re/Le Ro/Lo
Wa Wi Wu We Wo
Nb

So that makes sense to me. The problem is that I haven't found a
programmatic way to do this. I've tried the Lingua::JA::Sort::JIS perl
module which does a localized ordering but seemingly only with respect to
katakana and not kanji. So I also tried the Unicode::Collate module and
while that seems to support a great deal of localization, I can't get it to
produce the desired ordering. So I'm not really sure if I should pursue
those modules or do something else? My latest thought is to try to use a
module like Lingua::JA::Romanize::Japanese which will convert the Japanese
glyphs to a romanized pronunciation that I could then try to sort on but I
kind of feel like I would be inventing something that someone else has
probably already built. Any thoughts?

Thanks,
Mike

-----Original Message-----
From: Dr Bean [mailto:greg(_at_)momotaro(_dot_)chinmin(_dot_)edu(_dot_)tw] 
Sent: Thursday, May 04, 2006 11:28 PM
To: perl-i18n(_at_)perl(_dot_)org
Subject: Re: ordering Japanese


On Wed, 03 May 2006, Mike Barborak wrote:

Hi,

1. 伊\xA8焉扤扤丹 JR京都店
2. アペックス 福山
3. アミュプラザ 鹿児島
4. オクノ 旭\xA8焉扤扤
5. さくら野百貨店 \xA8焉扤扤台
6. さつま屋 鹿児島
7. スタンス 米子
8. そごう 触焉扤扤妖\xB9
9. そごう \xA8焉扤扤葉店
10. そごう 大宮店
11. そごう 横浜店
12. エ焉扤扤ぅ▲皀鵐疋轡謄\x{2197}▲襯襦ヽ犖\xB6
13. ニューズ 熊本

Oops, I was reading this list in Big5. I guess iconv was doing its best.

Looked at as UTF-8, 1. comes after 3. because the 'i' in 'Isetan' comes
after the 'a' in 'Amyuplaza'.




<Prev in Thread] Current Thread [Next in Thread>