Asvarox / allkaraoke

Online Karaoke game with pitch detection in your browser
https://allkaraoke.party
78 stars 18 forks source link

Transliteration to ASCII of artist, title and search queries #264

Open bohning opened 3 months ago

bohning commented 3 months ago

For details, see: https://github.com/UltraStar-Deluxe/USDX/pull/795

Asvarox commented 3 months ago

Hi, thanks for raising this up, fix is on the way :)

bohning commented 3 months ago

Thanks! Sent you a mail!

bohning commented 3 months ago

Does it take time to deploy it to allkaraoke.party? I just tested it and the issue is still there.

Asvarox commented 3 months ago

Well, the deployment went through like 2 minutes before your comment so maybe there was still some cache in place 😅 Can you try now or provide what input you're entering?

bohning commented 3 months ago

Ah okay, then I was too impatient. I was searching for "don't" (to find Queen's Don't Stop Me Now), but it didn't show up. However, searching for "don’t" (note the typographer’s apostrophe), it showed up (although it was displayed with the upright apostrophe. Now after the update, searching for "don't" brings up the song, that's fixed. However, ignoring special characters will not the solution for all uses cases, I guess. What if someone with an American keyboard layout wants to sing a German song containing Umlauts or a Polish song containing e.g. "ł" (e.g. Łaskowyj Maj - Biełyje rozy). The user can't type it, so searching for "Laskowyj Maj" or "Bielyje rozy" should find the song. And the opposite would also work with ASCII normalization - let's say someone submitted the song as "Laskowyj Maj - Bielyje rozy", but a user doesn't know, so he searches for "Łaskowyj Maj - Biełyje rozy", then the song would show up as well if artist/title and search string are ASCII-normalized.

See: https://github.com/anyascii/anyascii

Asvarox commented 3 months ago

Ok, thanks for confirming :) . Diacritics are actually covered to some degree, though there's certainly room for improvement. For example, writing "bez tebe" will bring up "Океан Ельзи - Без тебе" as per the title, but the artist's Latin transliteration "Okean Elzy" doesn't work

I'll take a look at the lib you provided to see if it yields better results than what's already there. I really appreciate your feedback and help with this :)