-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix artist name swapping for special cases, eg CSN&Y and apply to Ajax requests #58
Comments
Good idea! I like that we're refining this. In addition to the special character test, one possible additional test to prevent unintended swapping could be this: If a single word (no spaces) follows 'and' or the final comma, then do not apply name swapping. This would prevent swapping in cases like Romain's, 'The Choir of St. John's College, Cambridge' (one word following the comma), as well as things like, 'Peter, Paul and Mary' (one word following 'and'). Counter example: 'Peter, Paul and John Smith' Here, there is more than one word following 'and', so normal swapping would apply => Paul Peter and John Smith. [Edit: Maybe just the 'and' test above and not the comma test, as the latter seems more complex. For example, 'Van der Laan, Guus' should be swapped, but 'Jesus College, Oxford' not swapped. I am not sure there is an easy way to differentiate these. However, the 'and' case should be fairly straightforward (Peter, Paul and Mary (not swap) versus Peter, Paul and Mary Smith (swap).] |
I've simplified the logic do only swap names if there is a single comma and the name is not manually entered. This covers all of the above issues. Can you think of any other test cases? |
Sounds good to me. It is one of those things that we can continue to finesse going forward if and as needed. |
Patch landed 2.4.1; closing |
Fix artist name swapping for special cases, eg CSN&Y. The name swapper reverses the <LAST>, <FRIST> name order in the ZK DB to <FIRST> <LAST> for improved readability. The problem is that the implementation munges the order for certain names. Challenge is to not apply swapping in those special cases while preserving it for the majority of names. Name swapping should also be applied to the output of Ajax requests that generate artist names, eg the onnow request.
Suggest Fix:
Do not apply name wapping if the base string contains special characters, eg '&'.
The text was updated successfully, but these errors were encountered: