there's no objective categorisation possible with genres anything like the ones we have now. What genre a song is is a matter for judgement, not measurement, and there's no central authority to arbitrate on the matter.
A few reasons why it's difficult to label songs accurately by the genres we know and love:
Genre labels are usually behind the times. In most cases, the first instances of songs that retrospectively come to be regarded as part of a genre weren't described as such at the time of their release, as the genre name hadn't been coined yet. And usually, early songs are not archetypal examples of a genre, but crossover works showing some elements of extant genres, and some novel elements.
Genre labels get re-defined. Look at what r 'n' b means now, compared to 50 years ago.
Genre labels are hierarchical - some genres are definitely subsets of others; yet others arguably so (and people will argue - look at the talk page on any Wikipedia page about a genre). This gives yet another dimension for disagreement.
...and yet they are not truly hierarchical either, because some overlap without one being a subset of the other (maybe 'Punk' and 'New Wave', for example)
Genre labels describe completely different dimensions of musicology. Looking at https://en.wikipedia.org/wiki/List_of_popular_music_genres...
- some relate where the music is from ("K-pop");
- Some are descriptions of the techniques used ("Dub") and the technology ("Electronica");
- some have cultural references ("Christian country music");
- Some relate to how seriously the music is intended to be taken ("Novelty music");
- Some are named after record labels ("2 Tone", "Motown").
- Some relate to how the music is listened to ("Dancehall").
So not every word that is a the name of a music genre is even talking about the same quality of the music - or even talking about a quality of music at all.