The Counter Ontology

Hello again ;)

Over the last weeks, I also co-developed the Counter Ontology. This ontology is a generalisation of the Playcount Ontology from Yves Raimond. It includes a general multiple purpose counter concept, which could be uses to associate any concept to a co:Counter instance(s) with the property co:counter or a specific sub property of it.

The Counter Ontology - Counter concept as graph with relations

The second property of co:Counter is co:count, which is a simple xsd:integer based datatype property. That means you could use this concept for things like for example play counter, skip counter or website hit counter.

The Counter Ontology - Scrobble event concept as graph with relations

Furthermore, this ontology includes already a predefined property to associate event (event:Event) specific counter to its related events (co:event_counter, co:event), e.g. a co:ScrobbleEvent to scrobble something. This enables the opportunity to trace back all related events, which are responsible for a specific count. Of course, this is also possible with all other concepts ;)

@prefix bibo: <http://purl.org/ontology/bibo/&gt; .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#&gt; .
@prefix dc: <http://purl.org/dc/elements/1.1/&gt; .
@prefix co: <http://purl.org/ontology/co/core#&gt; .
@prefix ex: <http://example.org/&gt; .
 
ex:WebpageCounter a co:Counter ;
   dc:title "Webpage Counter"^^xsd:string ;
   dc:creator <http://foaf.me/zazi#me&gt; ;
   dc:description "A counter of a specific web page"^^xsd:string ;
   co:count 10 .
 
<http://smiy.wordpress.com/&gt; a bibo:Document ;
   co:counter ex:WebpageCounter .

A simple use case of the Counter Ontology is a website hit counter as described in the RDF/Turtle representation above (see also RDF and N3 for downloadable representations of this example). This examples shows, how a co:Counter instance could be used as a counter for a specific webpage (here of the type bibo:Document). Toby Inkster implemented an example of a webpage counter based on the Counter Ontology in PHP, which is available here.

@prefix xsd: <http://www.w3.org/2001/XMLSchema#&gt; .
@prefix dc: <http://purl.org/dc/elements/1.1/&gt; .
@prefix co: <http://purl.org/ontology/co/core#&gt; .
@prefix mo: <http://purl.org/ontology/mo/&gt; .
@prefix ex: <http://example.org/&gt; .
@prefix event: <http://purl.org/NET/c4dm/event.owl#&gt; .
@prefix time: <http://www.w3.org/2006/time#&gt; .
 
ex:PlayBackCounter a co:Counter ;
   dc:title "Play Back Counter"^^xsd:string ;
   dc:creator <http://foaf.me/zazi#me&gt; ;
   dc:description "A play back counter of a specific music track"^^xsd:string ;
   co:count 2 ;
   co:object ex:SexMachine .
 
ex:SexMachine a mo:Track ;
   dc:title "Sex Machine"^^xsd:string ;
   dc:creator <http://dbpedia.org/resource/James_Brown&gt; .
 
ex:SexMachineSE1 a co:ScrobbleEvent ;
   event:time [
      a time:Instant ;
      time:inXSDDateTime "2010-07-15T11:21:52+01:00"^^xsd:dateTime
      ] ;
   event:agent <http://foaf.me/zazi#me&gt; ;
   co:event_counter ex:PlayBackCounter .
 
ex:SexMachineSE2 a co:ScrobbleEvent ;
   event:time [
      a time:Instant ;
      time:inXSDDateTime "2010-07-15T11:27:52+01:00"^^xsd:dateTime
      ] ;
   event:agent <http://foaf.me/zazi#me&gt; ;
   co:event_counter ex:PlayBackCounter .

A bit more complex use case is a play back counter of a music track, which is related to all relevant play back events of this music track. This example is described in the RDF/Turtle representation above (see also RDF and N3 for downloadable representations of this example). It shows, how a co:Counter instance could be used as a play back counter for a specific music track (here of the type mo:Track). Each time, when this specific music track was played, a co:ScrobbleEvent instance was created and linked to its playback counter with the property co:event_counter.

As you can see the use cases of the Counter Ontology are diverse. The counter concept is currently also specified in the Play Back Ontology, which defines a pbo:MediaActionCounter concept, where specific media action counter can be derived from, e.g. pbo:PlayBackCounter or pbo:SkipCounter.

I especially would like to thank very much Yves Raimond and Mats Skillingstad to help to establish this multiple purpose counter ontology and Toby Inkster for providing the web counter example. Please feel free to reuse the Counter Ontology also for your own projects (let me know your use cases ;) ). Comments, suggestions and critics are also very welcome.

Cheers,

Bob

Posted in announcement | Tagged , , , , , , , , , , , , | 2 Comments

The Ordered List Ontology

Over the last weeks, I co-developed the Ordered List Ontology. This is an ontology for describing ordered lists, which are also know as sequences. This concept is the result of a discussion about how to model playlists (especially of music tracks) and was proposed by Samer A. Abdallah.

The Ordered List Ontology - concepts and relations

It consists of two concepts – olo:OrderedList and olo:Slot. That means an ordered list is a composite of all slots, which are part of this ordered list (related by the property olo:slot). Although, the Ordered List Ontology is OWL based, the ontology also provides “backward” compatibility to the RDFS world.
The initial and primary access method to single slots in an ordered list should be olo:index, because this property represents the fixed index of a slot in an ordered list. Thereby, the property olo:length relates to the length of an ordered list, the number of included slots. The secondary access method is its (currently) optional iterator olo:next as shortcut to the next slot in the list. The items, which are arranged in an ordered list, are associated by the property olo:item to a slot.
Since, the Ordered List Ontology won’t restrict its users in how they have to apply the ontology, all properties also have an inverse property. These are explicitly defined for inverse properties, which introduce also a new meaning (olo:ordered_list, olo:previous), and anonymous defined for the rest of the inverse properties.

The Ordered List Ontology - Playlist example

An use case of the Ordered List Ontology is for example a music playlist (see also RDF and N3 for downloadable representations of this example). This example is illustrated in the graphic above and in the RDF/Turtle representation below.
The whole music playlist is an olo:OrderedList* instance and could be annotated with further editoral metadata, e.g. a title, a description and a creator. Each track (mo:Track) of the music playlist is embedded into an olo:Slot instance. The music playlist has a fixed length (olo:length) and each slot has a fixed index (olo:index) in the ordered list it belongs to.

@prefix xsd: <http://www.w3.org/2001/XMLSchema#&gt; .
@prefix dc: <http://purl.org/dc/elements/1.1/&gt; .
@prefix olo: <http://purl.org/ontology/olo/core#&gt; .
@prefix mo: <http://purl.org/ontology/mo/&gt; .
@prefix ex: <http://example.org/&gt; .
 
ex:FunkyPlaylist a olo:OrderedList ;
   dc:title "Funky Playlist"^^xsd:string ;
   dc:description "A playlist full of funky legends"^^xsd:string ;
   dc:creator <http://foaf.me/zazi#me&gt; ;
   olo:length 2 ;
   olo:slot [
   a olo:Slot ;
      olo:index 1 ;
   olo:item ex:SexMachine
   ] ;
   olo:slot [
   a olo:Slot ;
      olo:index 2 ;
      olo:item ex:GoodFoot
   ] .
 
ex:SexMachine a mo:Track ;
   dc:title "Sex Machine"^^xsd:string ;
   dc:creator <http://dbpedia.org/resource/James_Brown&gt; .
 
ex:GoodFoot a mo:Track ;
   dc:title "Good Foot"^^xsd:string .

Please feel free to reuse the Ordered List Ontology also for your own projects (let me know your use cases ;) ). Comments, suggestions and critics are also very welcome.

Cheers,

Bob

PS: Thanks to all people, which helped the Ordered List Ontology to what it is now (Samer A. Abdallah, Kurt Jacobson, Yves Raimond, Mats Skillingstad, Aldo Gangemi, …)

*) Of course, one could also sub class olo:OrderedList for a more specific playlist concept

Posted in announcement | Tagged , , , , , , , , , | 3 Comments