I just ran a quick test in python using the album names copied from the item edit interface for Grateful Dead, Led Zeppelin, Fleetwood Mac, Daft Punk, Prince, Mac Demarco, Taylor Swift, Metallica and a few others.
To compare and group the matches, I normalized each title with the following:
I removed the date parens at the end of each title.
I normalized capitalization, punctuation and whitespace.
IF the album title contained any of the following keywords enclosed in parens or brackets, I removed everything within the offending parens/brackets:
- deluxe
- expanded
- anniversary
- remaster
- remastered
- edition
- version
Then I compared by normalized titles and grouped the exact matches, with each match-grouping representing multiple versions of the same album that should (ultimately) be displayed as 1 title to the user.
The results were clean.
There were no false positives (that I could find)* and the only thing annoying that slipped through was TRON: Legacy - The Complete Edition (Original Motion Picture Soundtrack), because the "Edition" wasn't bound by parens/brackets, but situations like this are exceedingly rare in your current album database, if my tiny sample set is any indication.
Anyway, you're a wizard -- I know you'll find a smarter upstream-focused solution, it was just an interesting problem and I needed to warm up this AM with some vibe-coding. Godspeed!
UPDATE: Apologies to the Swifties who know that the "Taylor's Version"s should count as separate releases in this context, due to each being a ground-up rebuild of the original album.