When it comes to classifying music by genre, I've found wikipedia to have more interesting genre information than most other data sources.
I seem to remember a database that collected this sort of information from Wikipedia and made it more easily accessible, but I couldn't google anything up today.
If I was to attempt to retrieve this data, what are my options? Is there anything like what I described or do I need to go a-screen-scraping?
You should look into Freebase (see, for example, their musical artists table). If you do choose Wikipedia, then you should probably download a database dump.
Example comparing genre listings of Freebase and Wikipedia for the band Radiohead:
Edit: More importantly, I've included a working example using mjt, a Javascript framework designed for Freebase. Copy-paste this into a file, open with your browser, enter an artist's name, and see which genres Freebase has for them.
Less importantly, I've changed my examples and default to Radiohead. =)
<html>
<head>
<script type="text/javascript" src="http://mjtemplate.org/dist/mjt-0.6/mjt.js"></script>
</head>
<body onload="mjt.run()">
<pre mjt.script="">
var name = mjt.urlquery.name ? mjt.urlquery.name : 'Radiohead';
</pre>
<div mjt.task="q">
mjt.freebase.MqlRead([{
type: '/music/artist',
name: {
value:name,
lang:{name:{value:'English'}}
},
genre: [{
name: {
value:null,
lang:{name:{value:'English'}}}
}]
}])
</div>
<form method="get" action="">
<input type="text" name="name" value="$name" />
<input type="submit" value="search" />
</form>
<table mjt.for="topic in q.result">
<tr mjt.for="(var rowi = 0; rowi < topic.genre.length; rowi++)">
<td><pre mjt.script="">var gname = topic.genre[rowi].name;</pre>$gname.value</td>
</tr>
</table>
</body></html>
You're most likely using another language, but hopefully you can easily translate the above query.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With