Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Using The Music Ontology for Finding Similar Users
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  18 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
nomush  
View profile  
 More options Sep 13 2012, 1:39 am
From: nomush <naomiya...@gmail.com>
Date: Wed, 12 Sep 2012 22:39:40 -0700 (PDT)
Local: Thurs, Sep 13 2012 1:39 am
Subject: Using The Music Ontology for Finding Similar Users

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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob Ferris  
View profile  
 More options Sep 13 2012, 3:51 am
From: Bob Ferris <z...@smiy.org>
Date: Thu, 13 Sep 2012 09:51:08 +0200
Local: Thurs, Sep 13 2012 3:51 am
Subject: Re: Using The Music Ontology for Finding Similar Users
Hi Naomi,

to model a user's music preferences you could utilise the Cognitive
Characteristics Ontology (CCO) [1] as well. There is also an example
that deals with music preferences in the documentation of CCO, see [2].
If have all your required knowledge in your knowledge base you could
write SPARQL queries to get what you need (similarities between users).
You'll maybe even do not need the Similarity Ontology at the beginning.
This might be a further enhanced of your similarity algorithm. You could
utilise it for modelling similarities between music artists, or songs, ...

Cheers,

Bo

[1] purl.org/ontology/cco/core#
[2]
http://purl.org/ontology/cco/cognitivecharacteristics.html#sec-simple...

On 09/13/2012 07:39 AM, nomush wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob Ferris  
View profile  
 More options Sep 13 2012, 3:55 am
From: Bob Ferris <z...@smiy.org>
Date: Thu, 13 Sep 2012 09:55:50 +0200
Local: Thurs, Sep 13 2012 3:55 am
Subject: Re: Using The Music Ontology for Finding Similar Users
Hello again,

I forgot one good example, see [1]. It's a remodelling of a former
example modelled with UMIRL.

Cheers,

Bo

[1]
http://purl.org/ontology/cco/cognitivecharacteristics.html#sec-UMIRL-...

On 09/13/2012 09:51 AM, Bob Ferris wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nomush  
View profile  
 More options Sep 13 2012, 11:52 am
From: nomush <naomiya...@gmail.com>
Date: Thu, 13 Sep 2012 08:52:20 -0700 (PDT)
Local: Thurs, Sep 13 2012 11:52 am
Subject: Re: Using The Music Ontology for Finding Similar Users

Hi Bo,

Thank you so much for the quick reply! I'll be sure to check out all the
examples and try to implement a basic user similarity knowledge base.
Eventually I think I would like to you the Similarity Ontology since I
would like to model similarities between artists in order to find deeper
more meaningful similarities between users and not just whether they liked
the same artist, but I can start with a more simple task.

Thanks again,
Naomi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nomush  
View profile  
 More options Sep 13 2012, 7:13 pm
From: nomush <naomiya...@gmail.com>
Date: Thu, 13 Sep 2012 16:13:34 -0700 (PDT)
Local: Thurs, Sep 13 2012 7:13 pm
Subject: Re: Using The Music Ontology for Finding Similar Users

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:      <http://purl.org/ontology/mo/>
 2        PREFIX sim:     <http://purl.org/ontology/sim/>
 3        PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
 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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Bob Ferris  
View profile  
 More options Sep 14 2012, 4:14 am
From: Bob Ferris <z...@smiy.org>
Date: Fri, 14 Sep 2012 10:14:32 +0200
Local: Fri, Sep 14 2012 4:14 am
Subject: Re: Using The Music Ontology for Finding Similar Users
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:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kurt J  
View profile  
 More options Sep 14 2012, 11:02 am
From: Kurt J <kur...@gmail.com>
Date: Fri, 14 Sep 2012 11:02:39 -0400
Local: Fri, Sep 14 2012 11:02 am
Subject: Re: Using The Music Ontology for Finding Similar Users
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:      <http://purl.org/ontology/mo/>
        PREFIX sim:     <http://purl.org/ontology/similarity/>
        PREFIX foaf:    <http://xmlns.com/foaf/0.1/>
        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


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nomush  
View profile  
 More options Sep 14 2012, 12:12 pm
From: nomush <naomiya...@gmail.com>
Date: Fri, 14 Sep 2012 09:12:32 -0700 (PDT)
Local: Fri, Sep 14 2012 12:12 pm
Subject: Re: Using The Music Ontology for Finding Similar Users

Thank you both for the reply, I think I need to review SPARQL a bit more :)
I don't really know how I cam across the similarity ontology that I was
using, but http://purl.org/ontology/similarity/ seems well documented so
I'll use that one!

Thanks again,
Naomi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kurt J  
View profile  
 More options Sep 14 2012, 1:31 pm
From: Kurt J <kur...@gmail.com>
Date: Fri, 14 Sep 2012 13:31:00 -0400
Subject: Re: Using The Music Ontology for Finding Similar Users
You can find some info on the similarity ontology and some examples
that might be helpful  in my thesis:

http://kurtisrandom.com/pages/connections-in-music

I've not been working much in the world of RDF lately, but would be
happy to help if i can.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nomush  
View profile  
 More options Sep 14 2012, 3:07 pm
From: nomush <naomiya...@gmail.com>
Date: Fri, 14 Sep 2012 12:07:20 -0700 (PDT)
Local: Fri, Sep 14 2012 3:07 pm
Subject: Re: Using The Music Ontology for Finding Similar Users

Hi Kurt,

A quick question about formatting the RDF file using both the music and
similarity ontology.

I'm not sure how to make the connection between the property mo:similar_to
and the sim:similarity.

I'm trying to say that Shakira is 0.9 similar to Beyonce.

I have my MusicArtist object:

<mo:MusicArtist rdf:about=
"http://zitgist.com/music/artist/bf24ca37-25f4-4e34-9aec-460b94364cfc"

<foaf:name>Shakira</foaf:name>
<mo:similar_to rdf:resource="http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63"/>

then would I continue with:

<sim:similarity rdf:resource="http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63"/>
<sim:element>...
<sim:element>...

and so on?

Thanks for all your help,
Kurt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kurt J  
View profile  
 More options Sep 14 2012, 3:22 pm
From: Kurt J <kur...@gmail.com>
Date: Fri, 14 Sep 2012 15:22:04 -0400
Local: Fri, Sep 14 2012 3:22 pm
Subject: Re: Using The Music Ontology for Finding Similar Users
Using the Similarity Ontology sort-of deprecates using mo:similar_to.
You just don't need that property.  Your similarity relation becomes a
"thing".  So using n3 notation:

:shakira a mo:MusicArtist;
  foaf:name "Shakira" .

:beyonce a mo:MusicArtist;
  foaf:name "Beyonce".

:mysim a sim:Similarity;
  sim:element :beyonce;
  sim:element :shakira;
  sim:weight "<some calculated weight value>" .

In most implementations, you'd want :mysim to actually be a blank node
- triple stores tend to store these most efficiently and you would
have no cause to refer to :mysim by name - you'll only refer to it in
terms of it's elements.  And then the real strength of this approach
is you can bind additional metadata to the similarity (e.g. what was
used to infer the similarity).

Hopefully this helps.  Now the real trick will be filling in your
similarities and their weights :)

-kurt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nomush  
View profile  
 More options Sep 14 2012, 3:27 pm
From: nomush <naomiya...@gmail.com>
Date: Fri, 14 Sep 2012 12:27:11 -0700 (PDT)
Local: Fri, Sep 14 2012 3:27 pm
Subject: Re: Using The Music Ontology for Finding Similar Users

Thanks that actually helped a lot!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nomush  
View profile  
 More options Sep 14 2012, 6:04 pm
From: nomush <naomiya...@gmail.com>
Date: Fri, 14 Sep 2012 15:04:38 -0700 (PDT)
Local: Fri, Sep 14 2012 6:04 pm
Subject: Re: Using The Music Ontology for Finding Similar Users

Hello again,

I have tried using the similarity query, however, I never get any
information back. I'm assuming this is due to my rdf file.
Here it is:  

<?xml version="1.0" encoding="UTF-8"?>

<rdf:RDF

xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"

xmlns:foaf="http://xmlns.com/foaf/0.1/"

xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"

xmlns:rss="http://purl.org/rss/1.0/"

xmlns:dc="http://purl.org/dc/elements/1.1/"

xmlns:html="http://www.w3.org/1999/xhtml"

xmlns:mo="http://purl.org/ontology/mo/"

xmlns:sim="http://purl.org/ontology/similarity/">

<mo:MusicArtist
rdf:about="http://zitgist.com/music/artist/bf24ca37-25f4-4e34-9aec-460b94364cfc">

<foaf:name>Shakira</foaf:name>

</mo:MusicArtist>

<mo:MusicArtist
rdf:about="http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63">

<foaf:name>Beyonce</foaf:name>

</mo:MusicArtist>

<sim:Similarity>

<sim:element
rdf:about="http://zitgist.com/music/artist/bf24ca37-25f4-4e34-9aec-460b94364cfc"/>

<sim:element
rdf:about="http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63"/>

<sim:weight>0.9</sim:weight>

</sim:Similarity>

</rdf:RDF>

I have a few questions. For the similarity, should I have an rdf:about= the
similarity link from the last.fm wrapper? Or am I just complicating things
too much?

While music brainz looks like a great database, I think I'm getting to
caught up in all the data available, since I only have the  artists' names
and not their mbid.

I tried querying it using n3 format, however I keep getting errors from the
jean api, since I don't think it can handle parsing those formats, so I'm
stuck using rdf/xml.

Naomi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kurt J  
View profile  
 More options Sep 14 2012, 7:17 pm
From: Kurt J <kur...@gmail.com>
Date: Fri, 14 Sep 2012 19:17:20 -0400
Local: Fri, Sep 14 2012 7:17 pm
Subject: Re: Using The Music Ontology for Finding Similar Users
Sorry, my RDF is a bit rusty.  Look at this tool - it is your friend:

http://www.rdfabout.com/demo/validator/

So I put my N3 in here - edited it till it was valid and matched yours
(i think):

@prefix mo: <http://purl.org/ontology/mo/> .
@prefix sim: <http://purl.org/ontology/similarity/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<http://zitgist.com/music/artist/bf24ca37-25f4-4e34-9aec-460b94364cfc>
a mo:MusicArtist;
  foaf:name "Shakira" .

<http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63>
a mo:MusicArtist;
  foaf:name "Beyonce".

and the xml version is like:

<?xml version="1.0"?>
<rdf:RDF xmlns:mo="http://purl.org/ontology/mo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:sim="http://purl.org/ontology/similarity/">
        <mo:MusicArtist
rdf:about="http://zitgist.com/music/artist/bf24ca37-25f4-4e34-9aec-460b94364cfc">
                <foaf:name>Shakira</foaf:name>
        </mo:MusicArtist>
        <mo:MusicArtist
rdf:about="http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63">
                <foaf:name>Beyonce</foaf:name>
        </mo:MusicArtist>
        <sim:Similarity rdf:about="#mysim">
                <sim:element rdf:resource="#beyonce" />
                <sim:element rdf:resource="#shakira" />
                <sim:weight>0.9</sim:weight>
        </sim:Similarity>
</rdf:RDF>

I would really invest the effort to learn and work in N3 - this is
really the "zen" syntax of RDF.  If you have valid N3, Jena will
definitely swallow it happily enough.  What I posted in my email was
"pseudo n3" and not valid.

Hope this helps!

-kurt


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kurt J  
View profile  
 More options Sep 14 2012, 7:30 pm
From: Kurt J <kur...@gmail.com>
Date: Fri, 14 Sep 2012 19:30:38 -0400
Local: Fri, Sep 14 2012 7:30 pm
Subject: Re: Using The Music Ontology for Finding Similar Users
Sorry, yet again i posted wrong N3 - i cut out a large portion.  This
is the valid N3:

@prefix mo: <http://purl.org/ontology/mo/> .
@prefix sim: <http://purl.org/ontology/similarity/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .

<http://zitgist.com/music/artist/bf24ca37-25f4-4e34-9aec-460b94364cfc>
a mo:MusicArtist;
  foaf:name "Shakira" .

<http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63>
a mo:MusicArtist;
  foaf:name "Beyonce".

:mysim a sim:Similarity;
  sim:element <http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63>;
  sim:element <http://zitgist.com/music/artist/bf24ca37-25f4-4e34-9aec-460b94364cfc>;
  sim:weight "0.9" .

And the XML was mangled a bit too b/c i put incorrect (but valid) N3
in the translator:

<?xml version="1.0"?>
<rdf:RDF xmlns:mo="http://purl.org/ontology/mo/"
xmlns:foaf="http://xmlns.com/foaf/0.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:sim="http://purl.org/ontology/similarity/">
        <sim:Similarity rdf:about="#mysim">
                <sim:element>
                        <mo:MusicArtist
rdf:about="http://zitgist.com/music/artist/f4d5cc07-3bc9-4836-9b15-88a08359bc63">
                                <foaf:name>Beyonce</foaf:name>
                        </mo:MusicArtist>
                </sim:element>
                <sim:element>
                        <mo:MusicArtist
rdf:about="http://zitgist.com/music/artist/bf24ca37-25f4-4e34-9aec-460b94364cfc">
                                <foaf:name>Shakira</foaf:name>
                        </mo:MusicArtist>
                </sim:element>
                <sim:weight>0.9</sim:weight>
        </sim:Similarity>
</rdf:RDF>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nomush  
View profile  
 More options Sep 14 2012, 8:10 pm
From: nomush <naomiya...@gmail.com>
Date: Fri, 14 Sep 2012 17:10:19 -0700 (PDT)
Local: Fri, Sep 14 2012 8:10 pm
Subject: Re: Using The Music Ontology for Finding Similar Users

Hi Kurt,

That validator is extremely helpful :) thanks! Since the rdf file changed
from the previous format, the sparql query above will need to change to the
following:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX mo: <http://purl.org/ontology/mo/>
PREFIX sim: <http://purl.org/ontology/similarity/>
SELECT DISTINCT ?level ?artist_name ?similar_artist_name
WHERE {
?blank a sim:Similarity;
sim:element ?one;
sim:element ?two;
sim:weight ?level .
?one a mo:MusicArtist;
foaf:name ?artist_name .
?two a mo:MusicArtist;
foaf:name ?similar_artist_name .

};

However, nothing is returned...
is there by any chance a sparql query validator?! haha


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kurt J  
View profile  
 More options Sep 14 2012, 8:30 pm
From: Kurt J <kur...@gmail.com>
Date: Fri, 14 Sep 2012 20:30:25 -0400
Local: Fri, Sep 14 2012 8:30 pm
Subject: Re: Using The Music Ontology for Finding Similar Users
re: the sparql query, i'd just start cutting stuff out until you get
some results.

 PREFIX mo: <http://purl.org/ontology/mo/>
 PREFIX sim: <http://purl.org/ontology/similarity/>
 SELECT *
 WHERE {
 ?sub a sim:Similarity;
         ?pred ?obj .

}

and see if that at least works.  can you dump the N3 you've input to pastebin?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
nomush  
View profile  
 More options Sep 17 2012, 1:14 pm
From: nomush <naomiya...@gmail.com>
Date: Mon, 17 Sep 2012 10:14:18 -0700 (PDT)
Local: Mon, Sep 17 2012 1:14 pm
Subject: Re: Using The Music Ontology for Finding Similar Users

No nothing is being printed out. For now I might not use the similarity
ontology and just with who the artist's are similar to and see if that
works.

Thanks,
Naomi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »