• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Small problem in searching
#1
Searching for songs with non-English characters in the title (e.g., with umlauts) is working fine mostly, but the Norwegian o with a slash (ø) isn't showing up if you only enter the unmodified character. For example, Søreide doesn't get found if you enter Soreide. This is true in Companion as well as on the tablet.
Thanks!
Jeanne
Reply
#2
Hi Jeanne,

I've enclosed two screenshots that seem to indicate that search
works as expected at least for the Title and Composer fields in
the current MobilsSheetsPro.

Since I no longer have a tablet with the (original) Mobilesheets,
I'm unable to test that.


Ketil


Attached Files Thumbnail(s)
       
Using Samsung Note Pro (SM-P900) with Android 5.0.2
Reply
#3
Hi,
It's searching correctly when you put the special character in the search box, which is what your screenshots show. It should also find those words if you only put a regular character (makes it quicker to search on a standard English keyboard, and also makes behavior consistent with Google and other search engines). So: if I search for "soreide" it should retrieve both "Søreide" and "Soreide". It works correctly for ö but not ø.
Thanks,
Jeanne
Reply
#4
I'm guessing Mike doesn't have (hasn't been told) the equivalent combinations to include.

If you want

æ  also = a or ae
ø also = o or oe
å also = a or aa

you probably just have to tell Mike about it.

Personally, I'm not crazy about the "single-letter" equivalents because it leads to too
many false results, but go ahead and suggest it to Mike.

Ketil
Using Samsung Note Pro (SM-P900) with Android 5.0.2
Reply
#5
This is going to get a bit technical, so forgive me, but the way words are transformed before searches is as follows: The words are normalized using Normalization Form D - Canonical Decomposition. The definition of that is: Characters are decomposed by canonical equivalence, and multiple combining characters are arranged in a specific order. This removes special characters so that something like å is replaced by a and a diacritical mark (which I remove, leaving just 'a'). The transformation is applied both to the search term entered in the box as well as all of the song values so that no special characters are used in the comparisons.

This handles most cases, but it would appear that ø is not just an o with a diacritical mark. It's an entirely separate character, so in order to handle that, I would have to add specific character substitutions during my search. I'll have to consider how I want to handle that going forward. If this is going to be important to a lot of users, I can consider performing a replacement of ø with o before comparions as well, but I don't want to add the overhead unless it's actually useful to the majority of people.

Mike
Reply
#6
Fiddler Jeanne's point is that Google's normalization works "both ways":
it's possible to enter "oe" and get results containing "ø", and it's even
possible to enter "o" and get results containing "ø".

So all three searches on the composer field should give results that
include "Løvland" (see attachments).

Ketil


Attached Files Thumbnail(s)
           
Using Samsung Note Pro (SM-P900) with Android 5.0.2
Reply
#7
Well if someone knows an implementation (i.e. link to code snippet) that can handle normalizing across all languages so that standard characters can be used, please let me know. Google may be doing a lot of language specific processing on the search phrase and results. In theory I can do the same, but I'm not familiar enough the rules and characters of each language to know what replacements are proper without considerable research.
Reply
#8
I'm considering adding a language check so that if the app language is set to Norwegian, it will perform the replacement of ø. Would that be sufficient, or do you also want it to work when the app language is set to English? I'm just trying to avoid having to perform multiple string substitutions/operations while comparing the search string to every field in the library (I basically have to normalize and substitute not only the search term but everything I compare the search term against as special characters cannot be present in either). I'm not sure what the performance impact will be, but unless it has a significant benefit, I'm looking to avoid it altogether.

Thanks,
Mike
Reply
#9
I'm afraid non-Norwegians may have Norwegian songs in their songbooks...
Also, my language is set to English despite I'm Dutch.
Johan
http://www.johanvromans.nlhttp://www.howsagoin.nlhttp://www.hetgeluidvanseptember.nl
Samsung Galaxy Note 2 (N8010) 10.1", Android 7.1.2 (LineageOS), AirTurn Duo & Digit.
Asus Zenpad (Z300M) 10.1", Android 7.0 (backup).
Samsung A3 (A320FL), Android 8.0 (emergency).
Reply
#10
I agree with you, sciurius,

this is of most interest when you don't have the keyboard for the national
characters you're searching for. 

Ketil
Using Samsung Note Pro (SM-P900) with Android 5.0.2
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2018 MyBB Group.