Converting ID3 tags to RDF

From Music Ontology Wiki

Jump to: navigation, search

cavarro __FORCETOC__

Contents

[edit] RDFizing songs

Note: this section came from Oscar's blog. The original (full with links) article can be found here.


We propose a way to RDFize tracks. The idea is to convert the ID3 tag information to RDF, based on the Music Ontology.

[edit] Example 1

http://foafing-the-music.iua.upf.edu/RDFize/track?artist=FOO&title=BAR.

The parameters are title and artist name. See results for title=the fly and artist=U2.

       <mo:Track rdf:about='http://musicbrainz.org/track/dddb2236-823d-4c13-a560-bfe0ffbb19fc'>
         <mo:puid rdf:resource='2285a2f8-858d-0d06-f982-3796d62284d4'/>
         <mo:puid rdf:resource='2b04db54-0416-d154-4e27-074e8dcea57c'/>
         <dc:title>The Fly</dc:title>
         <dc:creator>
           <mo:MusicGroup rdf:about='http://musicbrainz.org/artist/a3cb23fc-acd3-4ce0-8f36-1e5aa6a18432'>
             <foaf:img rdf:resource='http://ec1.images-amazon.com/images/P/B000001FS3.01._SCMZZZZZZZ_.jpg'/>
             <mo:musicmoz rdf:resource='http://musicmoz.org/Bands_and_Artists/U/U2/'/>
             <foaf:name>U2</foaf:name>
             <mo:discogs rdf:resource='http://www.discogs.com/artist/U2'/>
             <foaf:homepage rdf:resource='http://www.u2.com/'/>
             <foaf:member rdf:resource='http://musicbrainz.org/artist/0ce1a4c2-ad1e-40d0-80da-d3396bc6518a'/>
             <foaf:member rdf:resource='http://musicbrainz.org/artist/1f52af22-0207-40ac-9a15-e5052bb670c2'/>
             <foaf:member rdf:resource='http://musicbrainz.org/artist/a94e530f-4e9f-40e6-b44b-ebec06f7900e'/>
             <foaf:member rdf:resource='http://musicbrainz.org/artist/7f347782-eb14-40c3-98e2-17b6e1bfe56c'/>
             <mo:wikipedia rdf:resource='http://en.wikipedia.org/wiki/U2_%28band%29'/>
           </mo:MusicGroup>
         </dc:creator>
       </mo:Track>

[edit] Example 2

http://foafing-the-music.iua.upf.edu/RDFize/track?url=http://www.archive.org/download/(â?¦)/file.mp3

The parameter is a URL that contains an MP3 file. In this case it takes a little bit more, because we have to download (part of) the MP3 file (Note: we have a cron that removes all these MP3 files from our server). See the output results

       <mo:Track rdf:about='http://musicbrainz.org/track/7201c2ab-e368-4bd3-934f-5d936efffcdc'>
         <dc:creator>
           <mo:MusicGroup rdf:about='http://musicbrainz.org/artist/6b28ecf0-94e6-48bb-aa2a-5ede325b675b'>
             <foaf:name>Blues Traveler</foaf:name>
             <mo:discogs rdf:resource='http://www.discogs.com/artist/Blues+Traveler'/>
             <foaf:homepage rdf:resource='http://www.bluestraveler.com/'/>
             <foaf:member rdf:resource='http://musicbrainz.org/artist/d73c9a5d-5d7d-47ec-b15a-a924a1a271c4'/>
             <mo:wikipedia rdf:resource='http://en.wikipedia.org/wiki/Blues_Traveler'/>
             <foaf:img rdf:resource='http://ec1.images-amazon.com/images/P/B000078JKC.01._SCMZZZZZZZ_.jpg'/>
           </mo:MusicGroup>
         </dc:creator>
         <dc:title>Back in the Day</dc:title>
         <mo:puid rdf:resource='0a57a829-9d3c-eb35-37a8-d0364d1eae3a'/>
         <mo:puid rdf:resource='02039e1b-64bd-6862-2d27-3507726a8268'/>
       </mo:Track>

[edit] A possible use case

So, once we can RDFize songs, whatâ??s next? Well, we can ask last.fm for the latest tracks a user has been listening to, and then RDFize them. This example shows the latest tracks a user (RJ) has been listening to.

Personal tools