Group Received: by 10.236.79.40 with SMTP id h28mr1809697yhe.48.1347634963432; Fri, 14 Sep 2012 08:02:43 -0700 (PDT) X-BeenThere: music-ontology-specification-group@googlegroups.com Received: by 10.236.88.242 with SMTP id a78ls6883371yhf.6.gmail; Fri, 14 Sep 2012 08:02:40 -0700 (PDT) Received: by 10.236.173.201 with SMTP id v49mr1928633yhl.19.1347634960016; Fri, 14 Sep 2012 08:02:40 -0700 (PDT) Received: by 10.236.173.201 with SMTP id v49mr1928632yhl.19.1347634960004; Fri, 14 Sep 2012 08:02:40 -0700 (PDT) Return-Path: Received: from mail-vc0-f179.google.com (mail-vc0-f179.google.com [209.85.220.179]) by gmr-mx.google.com with ESMTPS id i27si365120yhe.4.2012.09.14.08.02.39 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 08:02:39 -0700 (PDT) Received-SPF: pass (google.com: domain of kur...@gmail.com designates 209.85.220.179 as permitted sender) client-ip=209.85.220.179; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of kur...@gmail.com designates 209.85.220.179 as permitted sender) smtp.mail=kur...@gmail.com; dkim=pass header...@gmail.com Received: by mail-vc0-f179.google.com with SMTP id fl13so1345209vcb.10 for ; Fri, 14 Sep 2012 08:02:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=iiOo+uMTyCZu2/UIzJPuxwMOnfsWA+8uxcirsskxcJY=; b=mLAPY0dWt2EVmgFvbeVCGZDpB3AxVysbxSlV7w/0kXZmyVQmM5t3YUhhIbuztRDqGM 9Qvbs1uW1sIPj8dL+gwMI6Mf3aBrIHkUwFNhOvsc0CCX6+1PA58HbUkKKptEwOp7/q2f wJjAEQbPYuZ4JqWZafmCsAotlGK9ldbuVAHw7Zo5dbGsJGuHpdBs08aet/+8IV7YE8qX 85w+0BfHDZC7+rsPIbkrmRnIkbu4YE+5+eBAVVVE7uhDDavgEDLJ/zOiGhP/navoAOUz OSKsoUd3I3U2TDWsbcmraq4JkM3vmRp49rSzhNtZkA3VvVhZ/ghuxQsvjcuE4Y+vx+nh 2nhw== MIME-Version: 1.0 Received: by 10.58.4.232 with SMTP id n8mr2406983ven.54.1347634959666; Fri, 14 Sep 2012 08:02:39 -0700 (PDT) Received: by 10.58.181.202 with HTTP; Fri, 14 Sep 2012 08:02:39 -0700 (PDT) In-Reply-To: <5052E768.9090...@smiy.org> References: <9e062251-fffd-4aa7-9fb8-af1e2f3fd21b@googlegroups.com> <5052E768.9090...@smiy.org> Date: Fri, 14 Sep 2012 11:02:39 -0400 Message-ID: Subject: Re: Using The Music Ontology for Finding Similar Users From: Kurt J To: music-ontology-specification-group@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Hello Naomi, I'm a little confused about which similarity ontology you are using. It seems it is not this one: http://purl.org/ontology/similarity/ And the namespace you are using (http://purl.org/ontology/sim/) doesn't resolve to anything for me. I would recommend using the one at http://purl.org/ontology/similarity/ but I'm a bit biased :) Then your query might look like: PREFIX mo: PREFIX sim: PREFIX foaf: SELECT DISTINCT ?level ?similar_artist_name WHERE { ?artist a mo:MusicArtist; foaf:name "Shakira". ?blank a sim:Similarity ; sim:element ?artist; sim:element ?similar_artist; sim:weight ?weight. ?similar_artist a mo:MusicArtist; foaf:name ?similar_artist_name. } FILTER (?weight > 0.8) -kurt On Fri, Sep 14, 2012 at 4:14 AM, Bob Ferris wrote: > Hi Naomi, > > this is more a generic SPARQL question rather than a Music Ontology related > question. Anyway, I'll give you a hint ;) > You should utilise the FILTER clause [2] of SPARQL to reduce your result set > to artists that have a similarity level of 80%+ > This looks like that you have to insert a > > FILTER (?level > 0.8) > > near the end of your query. > > Cheers, > > > Bo > > > PS: btw, as source for music artist information you could leverage e.g. > MusicBrainz (includes RDFa in their sites), DBPedia (a partial enhanced RDF > mapping of Wikipedia), or you write an RDF wrapper for the Echo Nest API > > > [2] http://www.w3.org/TR/sparql11-query/#scopeFilters > > > On 09/14/2012 01:13 AM, nomush wrote: >> >> I have been playing around with the Characteristic Ontology and was able >> to combine it with the Similarity Ontology and Music Ontology as well. >> In the Music Ontology they have an example query for getting the name's >> of the artists similar to the given artist to at least 80%. >> >> >> Finding the names of the Artists similar to another Artist to at least >> 80% >> >> 1 PREFIX mo: >> 2 PREFIX sim: >> 3 PREFIX foaf: >> 4 SELECT DISTINCT ?level ?similar_artist_name >> 5 WHERE >> 6 { >> 7 ?artist a mo:MusicArtist; >> 8 foaf:name "Shakira". >> >> 9 ?artist sim:link ?blank. >> 10 ?blank sim:relation mo:similar_to; >> 11 sim:level ?level; >> 12 sim:to ?similar_artist. >> >> 14 ?similar_artist a mo:MusicArtist; >> 16 foaf:name ?similar_artist_name. >> 17 } >> >> >> First of all, I'm a little confused about the working of this query. >> Should it return the artists that are at least 80% similar to the given >> artist? >> If this is what it should return, I'm confused about how it does so, >> since when I run the query on my rdf I just get back all the artists, no >> matter their level of similarity. >> How can I filter the result so it will only return those artists that >> have a similarity level of at least 0.8? >> >> Thanks in advance, >> Naomi >> >> On Wednesday, September 12, 2012 10:39:41 PM UTC-7, nomush wrote: >> >> Hello Everyone! >> >> I have just started learning about ontologies and am a bit confused >> as to how to go about implementing actual applications that utilize >> the music ontology and the Similarity ontology in order to find >> musical similarities between users. I'm collecting user's music >> likes (in the form of the artist's/band's name). Here is where it >> gets a bit fuzzy. >> Is the next next to create an RDF file for each artist/band stating >> their genre and similar artists/bands and then through the Jena API >> (I would like to code in Java if possible) query the knowledge base, >> meaning that if I enter a user's music preferences I would be able >> to output users with similar musical preferences. >> >> Thanks in advance, >> Naomi > > > -- > You received this message because you are subscribed to the Google Groups > "Music Ontology Specification Group" group. > To post to this group, send email to > music-ontology-specification-group@googlegroups.com. > To unsubscribe from this group, send email to > music-ontology-specification-group+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/music-ontology-specification-group?hl=en. >