Author Topic: Diacritical marks aren't ignored when sorting  (Read 7895 times)

Skoop

  • Sr. Member
  • ****
  • Posts: 277
For example, in the the sort order of albums as displayed in Artwork view, Déjà vu appears after all of the other D's, and Pärt appears after all of the other P's. 

There is a choice in preferences to ignore diacritical marks when searching.  They should also be ignored when sorting, if desired.

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34369
processing diacritic marks to be neutral for comparison is very expensive. Doing it for a search is just one pass through your library. Doing it on sorting is many more times that, so for people with large libraries it would potentially slow things down.
I'm not sure i will implement this but when i come to look at it i will see how bad it is.

SimonBRT

  • Sr. Member
  • ****
  • Posts: 434
+1 if this is a possibility without slowing things too much.  for example, in my library artist: 'Ólafur Arnalds' always appears at the end.  would be great to see appearing under 'O' instead.

Skoop

  • Sr. Member
  • ****
  • Posts: 277
Quote
it would potentially slow things down.
I'm not sure i will implement this but when i come to look at it i will see how bad it is.

It's not condition red by any means.  I'd rather not sacrifice speed for a handful of sorts. 

VX

  • Guest
I think this feature is worth implementing, but

Doing it on sorting is many more times that, so for people with large libraries it would potentially slow things down.

I'd make it optional and disabled by default. Users could enable it for sorting, just like they can do for searching, but in the Preferences they should be given a short info about potential slow down (like the one above).

Despite ignoring diacritical marks I'd add an option to group Latin and Cyrillic letters together when sorting.

So +1 for the feature request.

Maleko12

  • Member
  • Sr. Member
  • *****
  • Posts: 658
Yeah, if it has the possibility to slow things down (or even if it doesn't), I like it as an option with a warning about what can happen. Although I do have a fairly large library (32,000+ tracks), I do have tracks that have diacritical marks and I get somewhat thrown off by it.

Anti

  • Member
  • Sr. Member
  • *****
  • Posts: 952
> processing diacritic marks to be neutral for comparison is very expensive.

I don't know anything about programming or what would be involved in doing this.
But I have seen website CMS software utilise a user-defined 'transliteration' file like the ones below.

Transliteration Example 1 (Drupal)
Transliteration Example 2 (Text Pattern)

Probably won't help, but thought I'd post anyway, just in case.
I suspect you'd have to keep the original database cell for viewing, and an extra, separate, transliterated cell just for sorting.
That would effectively double the size of the database, wouldn't it?
Last Edit: January 02, 2012, 05:41:59 PM by Anti

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34369
this is done for the next update. I've managed to get it so the difference in speed when enabled is negligible, so it uses the same "ignore diacritic marks" setting in Tags(2) preferences.
It does one compromise to improve the performance, and that is only looks at the first 5 chars for diacritic marks, so
aaaaaé
would sort after
aaaaaf

whereas
aaaaé
would sort before
aaaaf
Last Edit: January 21, 2012, 01:54:00 PM by Steven


canonlp

  • Newbie
  • *
  • Posts: 18
I have tried the update, and it works. But when I type the letters of an artist to jump to it, it gets stuck on one artist. Mainly for me Álfheimr. So if I try typing artists after it, it will go to Álfheimr.


Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34369

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34369

tompeto

  • Full Member
  • ***
  • Posts: 151
The sorting problem with diacritic marks is happening again.