Re: Japanese Text Sort Order

2011-12-15 Thread Tetsuya Morimoto
Hi, After my previous post, I found a library named Unihandecode which resolves the "multiple reading" problem. This library is intended Kanji to Kana in ascii for Japanese. It might be your help. http://www.slideshare.net/miurahr/unihandecode-a-transliterate-library-for-unicode https://launchpad

Re: Japanese Text Sort Order

2011-12-15 Thread JohnA
I just joined this group and this is the first thread I’m responding to so please bear with me as a newbie. The question posed by Denys Poulat on Dec 14 2011 is mostly answered at the beginning of the long thread that it now appears at the end of, particularly the responses of Tetsuya Morimoto and

Re: Japanese Text Sort Order

2011-12-14 Thread Masklinn
On 2011-12-14, at 18:17 , Denys Poulat wrote: > Hello everyone, > > Does anyone have a solution for us about sorting in Japanese? > > We have a list of names (in Japanese, typed by Japanese people with > Japanese computer), and we want to order them like in the dictionary: > A > Ka > Sa > Ta > …

Re: Japanese Text Sort Order

2011-12-14 Thread Denys Poulat
Hello everyone, Does anyone have a solution for us about sorting in Japanese? We have a list of names (in Japanese, typed by Japanese people with Japanese computer), and we want to order them like in the dictionary: A Ka Sa Ta ... If you have code or if you can do it, thanks to contact us: cont

Re: Japanese Text Sort Order

2011-01-06 Thread Keishi Katoux
Hi, James This is supplementation of what Morimoto-san wrote. I'm Japanese too. You must use readings for ordering. Japanese dictionary ordering is by pronunciation, not by alphabetical order. In English, 'food' is put at nearby 'foot'. In Japanese, 'quick'(kwik) is put at nearby 'cuisine'(kwizi:

Re: Japanese Text Sort Order

2011-01-06 Thread Tetsuya Morimoto
Hi, James I'm Japanese. > Any other suggestions or ways to correctly sort Japanese Words? Though I'm not well versed in ordering Japanese words, my friend told me the standards named "JIS X 4061:1996". That's the standards using for Japanese dictionary(not python) or Japanese book index. The ja.

Re: Japanese Text Sort Order

2011-01-06 Thread Thuy Nhien Doan
On Thu, Jan 6, 2011 at 5:31 PM, James Hancock wrote: > Wow, I have no idea what you just said... but, I think I agree. > > *Man, the Japanese where not thinking about programming when they made > their language*. > > Any other suggestions or ways to correctly sort Japanese Words? > > Cheers, > Ja

Re: Japanese Text Sort Order

2011-01-06 Thread Masklinn
On 2011-01-06, at 11:31 , James Hancock wrote: > Any other suggestions or ways to correctly sort Japanese Words? I don't believe Python has any support for collations (locale-specific sorts, especially the Unicode Collation Algorithm and related Default Unicode Collation Element Table and Common

Re: Japanese Text Sort Order

2011-01-06 Thread James Hancock
Wow, I have no idea what you just said... but, I think I agree. If I am right, what you are saying is, because the same kanji has multiple readings and the words are sorted by reading and not the kanji itself, that dictionary is going to be impossibly difficult to make. quick example, skip if you

Re: Japanese Text Sort Order

2011-01-06 Thread Masklinn
On 2011-01-06, at 07:23 , Sam Walters wrote: > Hi, > Personally I would map the priority of every character in a dict and > pass this to sorted Given Japanese is not an alphabetical language and mixes syllabic and logographic scripts (the logographic system having a few thousand graphemes), I do

Re: Japanese Text Sort Order

2011-01-05 Thread James Hancock
Thanks I'll give that a shot. Just to clarify if I have the correct implementation in mind, would mylist list be a queryset of the items I want sorted? Also, I am not very familiar with the lambda syntax. Does x needs to be something? Or do I leave that part as is? Thanks, James Hancock On Thu

Re: Japanese Text Sort Order

2011-01-05 Thread Sam Walters
Hi, Personally I would map the priority of every character in a dict and pass this to sorted: dd = { "cha1": 1, "char2": 2, "char3": 3, "char4": 4, } result = sorted(mylist, key=lambda x:dd[x[0]]) Point being if the db query isnt too slow you could use python. cheers sam_w

Re: Japanese Text Sort Order

2011-01-05 Thread Seth Gordon
On 01/05/2011 07:57 AM, James Hancock wrote: > I think it does the same thing, but I was talking about how you cant set > 'ordering' under the Meta class in a model. > http://docs.djangoproject.com/en/1.2/ref/models/options/#django.db.models.Options.ordering > >

Re: Japanese Text Sort Order

2011-01-05 Thread James Hancock
Unfortunately following the ordinal value sorts the characters in a very rare way that no one knows how to use. It is an official order, but at that point is sort of defeats the purpose because they don't sort their characters that way in lists. Japanese is way weird that way. Thanks for all of th

Re: Japanese Text Sort Order

2011-01-05 Thread James Hancock
I think it does the same thing, but I was talking about how you cant set 'ordering' under the Meta class in a model. http://docs.djangoproject.com/en/1.2/ref/models/options/#django.db.models.Options.ordering

Re: Japanese Text Sort Order

2011-01-05 Thread Daniel Roseman
On Wednesday, January 5, 2011 8:31:02 AM UTC, James Hancock wrote: > > I have a site I am working on where the main language is Japanese. > When I tried to order the fields in my form on > http://goeigo.org/loc/tokyo/nakano/ by their Japanese name, it doesn't put > them in the right order. It so

Re: Japanese Text Sort Order

2011-01-05 Thread Kenneth Gonsalves
On Wed, 2011-01-05 at 17:31 +0900, James Hancock wrote: > How does ordering() order Japanese Unicode text? I do not know about japanese unicode, but ordering in Indian languages for instance just follows the ordinal value of the character. So if japanese unicode gives the first number to the first