ordering Japanese
[email protected] ("Mike Barborak") Wed, 3 May 2006 19:12:29 -0400
| Newsgroups | perl.i18n |
|---|---|
| Message-ID | <00e101c66f07$1e7a8d00$6401a8c0@Surprise> |
------=_NextPart_000_00E2_01C66EE5.9768ED00 Content-Type: multipart/alternative; boundary="----=_NextPart_001_00E3_01C66EE5.9768ED00" ------=_NextPart_001_00E3_01C66EE5.9768ED00 Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 7bit Hi, I am using Sadhiro Tomoyuki's Lingua::JA::Sort::JIS module to sort Japanese names of stores. I have come close to achieving the order my client has asked for but am having a little difficulty matching their request exactly. The problem seems to be collating kana glyphs with manyogana glyphs. (Please excuse me if I am misusing any terms - this is my first introduction to Japanese.) Here is an example of 13 store names ordered with Lingua::JA::Sort::JIS::msort: 1. $B0K@*C0!!(BJR$B5~ETE9(B 2. $B%"%Z%C%/%9!!J!;3(B 3. $B%"%_%e%W%i%6!!</;yEg(B 4. $B%*%/%N!!00@n(B 5. $B$5$/$iLnI42_E9!!@gBf(B 6. $B$5$D$^20!!</;yEg(B 7. $B%9%?%s%9!!JF;R(B 8. $B$=$4$&!!?@8ME9(B 9. $B$=$4$&!!@iMUE9(B 10. $B$=$4$&!!Bg5\E9(B 11. $B$=$4$&!!2#IME9(B 12. $B%@%$%"%b%s%I%7%F%#%"%k%k!!3`86(B 13. $B%K%e!<%:!!7'K\(B My client tells me that entry 1 should actually come after the 3rd entry and before the fourth. From this description on manyogana, I'm thinking they're saying that collation of the glyph $B0K(B should be based on its katakana adaptation $B%$(B which makes sense: http://en.wikipedia.org/wiki/Manyogana Note I'm basing many of my statements on staring at and comparing these glyphs online and so I might be far off. So my questions are: 1. Is my client correct in their ordering? 2. I believe I've tried all the combinations of collation levels and kanji classes in the Lingua::JA::Sort::JIS jcmp function but have not achieved the desired ordering. Have I perhaps missed the correct combination? 3. Is the solution to first convert the manyogana characters to katakana and then do the msort? If so does anyone know of a Perl module to do this or a nice reference that I could use more programmatically than the image on the link above? 4. Can anyone think of any other glyphs or classes of Japanese glyphs similar to manyogana that I should be worried about? Thanks for any help you can give me! Best, Mike P.S. The attachment is this same email but as a UTF-8 text file. ------=_NextPart_001_00E3_01C66EE5.9768ED00 Content-Type: text/html; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-2022-jp"> <TITLE>Message</TITLE> <META content=3D"MSHTML 6.00.2900.2873" name=3DGENERATOR></HEAD> <BODY> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006>Hi,</SPAN></FONT></DIV> <DIV><FONT face=3DArial><FONT size=3D2><FONT face=3DArial size=3D2><SPAN = class=3D703055022-03052006></SPAN></FONT></FONT></FONT> </DIV> <DIV><FONT><SPAN class=3D703055022-03052006><FONT face=3DArial = size=3D2>I am=20 using Sadhiro Tomoyuki's Lingua::JA::Sort::JIS module to sort Japanese = names of=20 stores. I have come close to achieving the order my client has asked for = but am=20 having a little difficulty matching their request exactly. The problem = seems to=20 be collating kana glyphs with manyogana glyphs. (Please excuse me = if I am=20 misusing any terms - this is my first introduction to=20 Japanese.)</FONT></SPAN></FONT></DIV> <DIV><FONT><SPAN class=3D703055022-03052006><FONT face=3DArial=20 size=3D2></FONT></SPAN></FONT> </DIV> <DIV><FONT><SPAN class=3D703055022-03052006><FONT face=3DArial = size=3D2>Here is an=20 example of 13 store names ordered with=20 Lingua::JA::Sort::JIS::msort:</FONT></SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>1. = =1B$B0K@*C0!!=1B(JJR=1B$B5~ETE9=1B(J<BR>2.=20 =1B$B%"%Z%C%/%9!!J!;3=1B(J<BR>3. =1B$B%"%_%e%W%i%6!!</;yEg=1B(J<BR>4. = =1B$B%*%/%N!!00@n=1B(J<BR>5. =1B$B$5$/$iLnI42_E9!!@gBf=1B(J<BR>6. = =1B$B$5$D$^20!!</;yEg=1B(J<BR>7.=20 =1B$B%9%?%s%9!!JF;R=1B(J<BR>8. =1B$B$=3D$4$&!!?@8ME9=1B(J<BR>9. = =1B$B$=3D$4$&!!@iMUE9=1B(J<BR>10. =1B$B$=3D$4$&!!Bg5\E9=1B(J<BR>11. = =1B$B$=3D$4$&!!2#IME9=1B(J<BR>12.=20 =1B$B%@%$%"%b%s%I%7%F%#%"%k%k!!3`86=1B(J<BR>13. = =1B$B%K%e!<%:!!7'K\=1B(J<BR></SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>My = client tells me=20 that entry 1 should actually come after the 3rd entry and before the = fourth.=20 From this description on manyogana, I'm thinking they're saying that = collation=20 of the glyph =1B$B0K=1B(J should be based on its katakana adaptation = =1B$B%$=1B(J which makes=20 sense:</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006><A=20 href=3D"http://en.wikipedia.org/wiki/Manyogana">http://en.wikipedia.org/w= iki/Manyogana</A></SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>Note = I'm=20 basing many of my statements on staring at and comparing these = glyphs=20 online and so I might be far off. </SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>So my = questions=20 are:</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>1. Is = my client=20 correct in their ordering?</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>2. I = believe I've=20 tried all the combinations of collation levels and kanji classes in the=20 Lingua::JA::Sort::JIS jcmp function but have not achieved the desired = ordering.=20 Have I perhaps missed the correct combination?</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>3. Is = the solution=20 to first convert the manyogana characters to katakana and then do the = msort? If=20 so does anyone know of a Perl module to do this or a nice reference that = I could=20 use more programmatically than the image on the link = above?</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>4. Can = anyone think=20 of any other glyphs or classes of Japanese glyphs similar to = manyogana that=20 I should be worried about?</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>Thanks = for any help=20 you can give me!</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006>Best,</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006>Mike</SPAN></FONT></DIV> <DIV><FONT face=3DArial size=3D2><SPAN=20 class=3D703055022-03052006></SPAN></FONT> </DIV> <DIV><FONT face=3DArial size=3D2><SPAN class=3D703055022-03052006>P.S. = The attachment=20 is this same email but as a UTF-8 text = file.</DIV></SPAN></FONT></BODY></HTML> ------=_NextPart_001_00E3_01C66EE5.9768ED00-- ------=_NextPart_000_00E2_01C66EE5.9768ED00 Content-Type: application/octet-stream; name="question.utf8" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="question.utf8" Hi, I am using Sadhiro Tomoyuki's Lingua::JA::Sort::JIS module to sort = Japanese=20 names of stores. I have come close to achieving the order my client has = asked=20 for but am having a little difficulty matching their request exactly. = The=20 problem seems to be collating kana glyphs with manyogana glyphs. (Please = excuse=20 me if I am misusing any terms - this is my first introduction to = Japanese.) Here is an example of 13 store names ordered with = Lingua::JA::Sort::JIS::msort: 1. =E4=BC=8A=E5=8B=A2=E4=B8=B9=E3=80=80JR=E4=BA=AC=E9=83=BD=E5=BA=97 2. = =E3=82=A2=E3=83=9A=E3=83=83=E3=82=AF=E3=82=B9=E3=80=80=E7=A6=8F=E5=B1=B1 3. = =E3=82=A2=E3=83=9F=E3=83=A5=E3=83=97=E3=83=A9=E3=82=B6=E3=80=80=E9=B9=BF=E5= =85=90=E5=B3=B6 4. =E3=82=AA=E3=82=AF=E3=83=8E=E3=80=80=E6=97=AD=E5=B7=9D 5. = =E3=81=95=E3=81=8F=E3=82=89=E9=87=8E=E7=99=BE=E8=B2=A8=E5=BA=97=E3=80=80=E4= =BB=99=E5=8F=B0 6. = =E3=81=95=E3=81=A4=E3=81=BE=E5=B1=8B=E3=80=80=E9=B9=BF=E5=85=90=E5=B3=B6 7. =E3=82=B9=E3=82=BF=E3=83=B3=E3=82=B9=E3=80=80=E7=B1=B3=E5=AD=90 8. =E3=81=9D=E3=81=94=E3=81=86=E3=80=80=E7=A5=9E=E6=88=B8=E5=BA=97 9. =E3=81=9D=E3=81=94=E3=81=86=E3=80=80=E5=8D=83=E8=91=89=E5=BA=97 10. =E3=81=9D=E3=81=94=E3=81=86=E3=80=80=E5=A4=A7=E5=AE=AE=E5=BA=97 11. =E3=81=9D=E3=81=94=E3=81=86=E3=80=80=E6=A8=AA=E6=B5=9C=E5=BA=97 12. = =E3=83=80=E3=82=A4=E3=82=A2=E3=83=A2=E3=83=B3=E3=83=89=E3=82=B7=E3=83=86=E3= =82=A3=E3=82=A2=E3=83=AB=E3=83=AB=E3=80=80=E6=A9=BF=E5=8E=9F 13. =E3=83=8B=E3=83=A5=E3=83=BC=E3=82=BA=E3=80=80=E7=86=8A=E6=9C=AC My client tells me that entry 1 should actually come after the 3rd entry = and=20 before the fourth. From this description on manyogana, I'm thinking = they're=20 saying that collation of the glyph =E4=BC=8A should be based on its = katakana adaptation=20 =E3=82=A4 which makes sense: http://en.wikipedia.org/wiki/Manyogana Note I'm basing many of my statements on staring at and comparing these = glyphs=20 online and so I might be far off.=20 So my questions are: 1. Is my client correct in their ordering? 2. I believe I've tried all the combinations of collation levels and = kanji=20 classes in the Lingua::JA::Sort::JIS jcmp function but have not achieved = the=20 desired ordering. Have I perhaps missed the correct combination? 3. Is the solution to first convert the manyogana characters to katakana = and=20 then do the msort? If so does anyone know of a Perl module to do this or = a nice=20 reference that I could use more programmatically than the image on the = link=20 above? 4. Can anyone think of any other glyphs or classes of Japanese glyphs = similar=20 to manyogana that I should be worried about? Thanks for any help you can give me! Best, Mike P.S. The attachment is this same email but as a UTF-8 text file. ------=_NextPart_000_00E2_01C66EE5.9768ED00--