in reply to Re: Re: Reverse Engineering Sort Order
in thread Reverse Engineering Sort Order
I think the problem was more mine than yours. zby managed to work out what you were asking, as evidenced by
Perhaps he want's an algorithm that given the sorted list would output the definition of the sorting function.
But no matter how many times I read it, I didn't get your drift.
However, since then I have given the problem some pretty serious thunking, and I'm really not sure that what your asking is possible. Leastwise, not if your after complete accuracy unless you have a very large sample set that reflects all the possible comparisons. Even then, there is another, trickier problem.
Lets assume somewhere in your dataset you had
cuerno chile
According to the POD for Sort::ArbBiLex, in a spanish dictionary, cuerno sorts before chile, because the 'ch' in chile, is considered a "single glyph" that sorts after the single glyph 'c' in cuerno.
The problem is, whos to says that there isn't a language where the second glyph in cuerno is 'ue', and that this is designated as sorting before the second glyph in chile, 'h'?
I simply cannot see any mechanistic way of making the determination of when 2 character codes represent a single glyph. It strikes me that the only way to do this is heuristically, and that means that you would have to already know what pairs consituted single glyphs up front.
I don't envy you the problem, but if you do solve it, I'd be very interested to see how you do it.
Good luck:)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Reverse Engineering Sort Order
by qq (Hermit) on Jun 10, 2003 at 19:11 UTC |