[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-21 Thread Carl Read
On 20-May-02, Brett Handley wrote: Interesting question. Tag! and Issue! might be useful for your design but both will not be able to handle certain characters. Actually, tags might be the best, as you can put strings in them and they could then be used to hold the multiple-letter

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-19 Thread Carl Read
On 18-May-02, G. Scott Jones wrote: By George, I think you've done it! At least it appears to sort the sample Hungarian word list correctly. That is a slick solution. It is about 35% faster than my original effort. Good job. I like the way you handled the characters of equivalent weight,

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-19 Thread G. Scott Jones
From: Carl Read One possible improvement in the creation of the rule would be to allow for some of the strings in blocks to be treated as a collection of seperate characters, perhaps by using a different string datatype to string!, such as file!. So that instead of this... [a b c ch d e]

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-19 Thread Brett Handley
Interesting question. Tag! and Issue! might be useful for your design but both will not be able to handle certain characters. I figured I could write some code to show what they are: chars-in-form: function [ example-form [block!] ] [all-chars useable-chars ch test-value] [ all-chars:

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-18 Thread G. Scott Jones
From: Geza Lakner MD In this case, the pattern has a bit more information: a=ábccsde=éfggyhi=í...zzs where a can be told to sort the same as a with acute, both of these sort before b ... and zs sorts after z Actually aá and eé ... more clearly aá and eé. In some relaxed situtations the

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-17 Thread Carl Read
On 17-May-02, G. Scott Jones wrote: From: Carl Read I've thoughts about how to speed it up - will be testing them out. Great! Well, not so great, actually. The new version's faster, but not markedly so. Perhaps 30% faster going by the single test of a long list of random words I did,

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-17 Thread G. Scott Jones
From: Carl Read The new version's faster, but not markedly so. Perhaps 30% faster going by the single test of a long list of random words I did, though it's still 7 or 8 times slower than REBOL's sort. Maybe if it was all done with parsing it'd be faster, but I'd have to re-think it all.

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence -proper and efficient sorting of national accented chars?)

2002-05-17 Thread Geza Lakner MD
Hello Scott In this case, the pattern has a bit more information: a=ábccsde=éfggyhi=í...zzs where a can be told to sort the same as a with acute, both of these sort before b ... and zs sorts after z Actually aá and eé ... more clearly aá and eé. In some relaxed situtations the equivalence

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-16 Thread Carl Read
On 16-May-02, G. Scott Jones wrote: This is extremely promising. I drew from the ISO-8859-2 character set to make a rule, and it initially seems to sort correctly. The time through is roughly the same as my hack (but I've not really set-up a clean time condition). I've thoughts about how to

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-16 Thread Carl Read
On 16-May-02, G. Scott Jones wrote: Hi, Carl, The idea did look promising, even for the multi-letter graphemes (like the czech ch), but then I believe we run into a limitation of 'parse. The longer phrase rule needs to come before the shorter one, so that: rule-4: pattern-rule [a A b B c

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-16 Thread Carl Read
On 16-May-02, Volker Nitsch wrote: Carl, my volley pass works similar to yours, except i made it more complicated :) Simple things should be simple. (So I can understand them;) your pattern-rule aAbBcC would look like [+ a + A + b + B + c + C] because i use blocks with strings, i can also

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-16 Thread G. Scott Jones
From: Carl Read On 16-May-02, G. Scott Jones wrote: This is extremely promising. I drew from the ISO-8859-2 character set to make a rule, and it initially seems to sort correctly. The time through is roughly the same as my hack (but I've not really set-up a clean time condition). I've

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-15 Thread Carl Read
On 15-May-02, G. Scott Jones wrote: From: Volker Nitsch ... not sure if this helps, but since i spended some time to it, i post ;) snipped code Hi, Volker, Neat idea. Kind of like a good cut of beef, I'm going to have to chew on it a bit to fully understand its potential. Thanks for

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-15 Thread G. Scott Jones
From: Carl Read On 15-May-02, G. Scott Jones wrote: From: Volker Nitsch ... not sure if this helps, but since i spended some time to it, i post ;) snipped code Hi, Volker, Neat idea. Kind of like a good cut of beef, I'm going to have to chew on it a bit to fully understand

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-15 Thread Volker Nitsch
Hi Carl, Scott, Gesa, Am Mittwoch, 15. Mai 2002 14:30 schrieb Carl Read: On 15-May-02, G. Scott Jones wrote: From: Volker Nitsch ... not sure if this helps, but since i spended some time to it, i post ;) snipped code Hi, Volker, Neat idea. Kind of like a good cut of beef,

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-15 Thread G. Scott Jones
From: G. Scott Jones From: Carl Read Anyway, I've played around with my idea for sorting according to a pattern, and while I'm not sure if the following code's very fast (or bug-free:), like Volker, I post. There's two functions: One to take a pattern for creating a rule from and

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence -proper and efficient sorting of national accented chars?)

2002-05-14 Thread Carl Read
On 14-May-02, G. Scott Jones wrote: From: Carl Read Would a sort/pattern be of use? ie... sort/pattern AabB aAbBcC ; == aAbB Hi, Carl, Are you suggesting this as a prototype of a call, or is there already such a beast out there? As a prototype of a call - ie, as an extra refinement

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-14 Thread Volker Nitsch
Hi Scott, Gesa, Carl, not sure if this helps, but since i spended some time to it, i post ;) rebol [title: char-mapping] { Hi Scott, Geza, Carl, instead of creating the mapping fully by hand, i created a little dialect, which creates a parse-rule. (not a very efficient one

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-14 Thread G. Scott Jones
From: Volker Nitsch ... not sure if this helps, but since i spended some time to it, i post ;) snipped code Hi, Volker, Neat idea. Kind of like a good cut of beef, I'm going to have to chew on it a bit to fully understand its potential. Thanks for the trans-atlantic volley ball pass. By

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence -proper and efficient sorting of national accented chars?)

2002-05-13 Thread Geza Lakner MD
Hello Scott! The right order for Hungarian vowels: actually the diaresis characters This was easy to fix. ... as you have prospectively pointed it out in your first post :-) Time to go back to the drawing board. I already have an idea, but it may take a while before I have some time to

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence -proper and efficient sorting of national accented chars?)

2002-05-13 Thread Carl Read
On 14-May-02, Geza Lakner MD wrote: Maybe I missed this in the English class :-) but does NOT sort English this way, too? What is the proper sorting order for mixed capitalized English words? Something I'd not thought about. This is what REBOL does... sort AabB == AabB sort/case

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-13 Thread G. Scott Jones
From: Geza Lakner MD Time to go back to the drawing board. I already have an idea, but it may take a while before I have some time to create the new algorithm. Good luck to braining out the new enhanced algorithm. :-) I think I've got it. In fact I'm expanding the idea to handle all the

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence -proper and efficient sorting of national accented chars?)

2002-05-12 Thread Geza Lakner MD
Hello Scott, Thanx, cute solution! Though my critical comments :-) : The right order for Hungarian vowels: actually the diaresis characters come first and then the double acute ones (only o and u have double accents in the Hungarian alphabet): oOóÓöÖõÕ uUúÚüÜûÛ Unfortunately the

[REBOL] Re: Hungarian Alphabet Sort (was Re: Collation sequence - proper and efficient sorting of national accented chars?)

2002-05-12 Thread G. Scott Jones
From: Geza Lakner MD snip The right order for Hungarian vowels: actually the diaresis characters come first and then the double acute ones (only o and u have double accents in the Hungarian alphabet): oOóÓöÖõÕ uUúÚüÜûÛ This was easy to fix. Unfortunately the case-insensitiveness does not