N-Squared Semantic Web

RDF Review Vocabulary

Please note the vocabulary is currently under revision (2008-12-23), for the latest version please see http://www.purl.org/stuff/rev
RDF Schema RDFS

Contents

  1. Introduction
  2. Terms
  3. hReview Profile
  4. Examples
  5. RDF Schema
  6. Contributors & Colophon
  7. License & Copyright
  8. See Also
  9. Changes

Vocabulary Status : stable (core) / testing (auxiliary elements)

Schema updated; this doc and XSLT in process of revision 2007-11-12

First version 2003-06-26, latest revision : 2007-11-12. Maintainers: Danny Ayers, Tom Heath


1 Introduction

This document provides a vocabulary specification for the purpose of creating sharable reviews and ratings of blogs, CDs, books, software, anything identifiable. It includes the definition of an RDF vocabulary as well as a GRDDL-enabled HTML meta data profile for the hReview microformat.

This specification aims to define the minimum terms needed to provide a review/rating capability, generally leaving the rest of the resource description to existing, more domain-appropriate vocabularies. The core terms are stable with several deployments (e.g. see Revyu), certain new terms are provisionally included while testing in deployment (see ITerating).

The vocabulary is suitable for use in any RDF-compatible language : FOAF, DOAP, RSS etc. It is also compatible with the hReview microformat, The vocabulary's OWL species is Ninja.

Namespaces

To use with microformats, see hReview Profile

The XML namespace for this vocabulary is http://www.purl.org/stuff/rev#

i.e. in RDF/XML documents the following attribute should be included in the rdf:RDF element :

xmlns:rev="http://www.purl.org/stuff/rev#"

Reviews written using the RDF Review Vocabulary will typically also use terms from the Dublin Core and FOAF namespaces :

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

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

2. Terms

Classes

Review
A review of a work
hasComment => Comment
hasFeedback => Feedback
positiveVotes => rdfs:Literal
reviewer => foaf:Person
title => rdfs:Literal
totalVotes => rdfs:Literal
vs:term_status : stable
Feedback
Feedback on the review. Expresses whether the review was useful or not
commenter => foaf:Agent

Comment
A comment on a review
rev:commenter => foaf:Agent

Properties

text
The text of the review

hasReview
Used to associate a work with a a review
domain: rdfs:Resource
range: Review

rating
A numeric value expressing the reviewer's value judgement on the work

maxRating
The maximum value of the rating scale used for this review

minRating
The minimum value of the rating scale used for this review

reviewer
The person that has written the review
domain: Review
range: foaf:Person

type
The type of media of a work under review

commenter
The commenter on the review
domain: rev:Comment, rev:Feedback
range: foaf:Agent

hasComment
Used to associate a review with a comment on the review
domain: Review
range: Comment

hasFeedback
Associates a review with a feedback on the review
domain: Review
range: Feedback

positiveVotes
Number of positive usefulness votes (integer)
domain: Review
range: rdfs:Literal

title
The title of the review
domain: Review
range: rdfs:Literal

totalVotes
Number of usefulness votes (integer)
domain: Review
range: rdfs:Literal

3. hReview Profile

This is a provisional XMDP profile for the hReview specification.

Use of this profile licenses RDF data extracted using hreview2rdfxml.xsl.

To apply this profile to a document (and GRDD-enable them), add the following profile attribute to its head element:

<head profile="http://www.purl.org/stuff/rev#">

Note multiple profiles can be used, space-separated, e.g.

<head profile="http://www.purl.org/stuff/rev# http://www.w3.org/2006/03/hcard http://purl.org/stuff/glink/">

Sample hReview, GRDDL output (Turtle view)

Terms

class

HTML4 definition of the 'class' attribute. This meta data profile defines some 'class' attribute values (class names) and their meanings as suggested by a draft of "Hypertext Links in HTML". All values are defined according to the semantics defined in the hReview specification.

hreview
hReview container
version
Version of hReview, semantics as in RFC2426 section "3.6.9 VERSION Type Definition"
summary
a title for the review
item
item info : name and URI(s) of the item (fn || url || photo ) | hCard (for person or business) | hCalendar (for event)
type
the type of the item being reviewed product | business | event | person | place | website | url
reviewer
the person who authored the review
dtreviewed
date time of when the review was written (ISO8601)
rating
decimal number from 1.0 to 5.0 inclusive indicating a rating for the item, higher indicating a better rating
description
the full text representing the written opinion of the reviewer
tags
a list of keywords or phrases that the reviewer associates with the item
url of the review
license
links to the license under which the contents of the hReview is licensed, using the rel-license microformat

4. Examples

For live current usage examples see Revyu and ITerating

Sample hReview, GRDDL output (Turtle view)

4.1 Album Review

Snippet of a profile generated by FOAF-o-matic
(mm is the MusicBrainz namespace (http://musicbrainz.org/mm/mm-2.1#), rdf:nodeID="A0" points to a foaf:Person elsewhere in the file)
     <mm:Album rdf:about="http://mm.musicbrainz.org/album/37b9a29b-2d39-441b-9ac6-81770916e5b5">
  
      <dc:title>Aftermath</dc:title>
  
      <review:hasReview>
          <review:Review>
              <review:rating>8</review:rating>
              <review:reviewer rdf:nodeID="A0"/>
              <dc:description>Classic.</dc:description>
          </review:Review>
      </review:hasReview>
  
      <dc:creator>
          <mm:Artist rdf:about="http://mm.musicbrainz.org/artist/b071f9fa-14b0-4217-8e97-eb41da73f598"/>
      </dc:creator>
  
  </mm:Album>
  
  <mm:Artist rdf:about="http://mm.musicbrainz.org/artist/b071f9fa-14b0-4217-8e97-eb41da73f598">
      <dc:title>The Rolling Stones</dc:title>
  </mm:Artist>

4.2 Review Embedded in RSS Feed

   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
                     xmlns:dc="http://purl.org/dc/elements/1.1/"
                     xmlns="http://www.purl.org/stuff/rev#"
                     xmlns="http://purl.org/rss/1.0/">

  <item rdf:about="http://mm.musicbrainz.org/album/bb4d834e-c21a-4288-bbee-d9b86c6c3f8b">

      <dc:title>Every Day</dc:title>
      <description></description>
      <dc:creator>
          <mm:Artist rdf:about="http://mm.musicbrainz.org/artist/7c158ea8-c0aa-410e-bdc1-20bba9759577">
              <dc:title>The Cinematic Orchestra</dc:title>
          </mm:Artist>
      </dc:creator>

     <review:hasReview>
          <review:Review>
              <review:rating>9</review:rating>
              <dc:description>Blinding</dc:description>
              <review:reviewer>
                  <foaf:Person>
                      <foaf:name>Leigh Dodds</foaf:name>
                  </foaf:Person>
          </review:Review>
      </review:hasReview>

  </item>

  </rdf:RDF>

5. RDF Schema

The following is the vocabulary expressed in Turtle, for informative purposes. The normative schema (which contains additional OWL compatibility statements) is available as a separate document : review.rdf

@prefix : <http://www.purl.org/stuff/rev#> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#> . 

# core (stable) terms
   
    :Review     a rdfs:Class;
         rdfs:comment "A review of an artistic work";
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "Review";
         vs:moreinfo "core term";
         vs:term_status "stable" .

    :hasReview     a rdf:Property;
         rdfs:comment "Used to associate a work of art with a a review";
         rdfs:domain rdfs:Resource;
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "hasReview";
         rdfs:range <http://www.purl.org/stuff/rev#Review>;
         vs:moreinfo "core term";
         vs:term_status "stable" .

    :rating     a rdf:Property;
         rdfs:comment "A numeric value";
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "rating";
         vs:moreinfo "core term";
         vs:term_status "stable" .
    
    :reviewer     a rdf:Property;
         rdfs:comment "The person that has written the review";
         rdfs:domain <http://www.purl.org/stuff/rev#Review>;
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "reviewer";
         rdfs:range foaf:Person;
         vs:moreinfo "core term";
         vs:term_status "stable" .
    
    :text     a rdf:Property;
         rdfs:comment "The text of the review";
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "text";
         vs:moreinfo "core term";
         vs:term_status "stable" .

    :type     a rdf:Property;
         rdfs:comment "The type of media of a work under review";
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "type";
         vs:moreinfo "core term";
         vs:term_status "stable" .

# Auxiliary (testing) terms

    :Comment     a rdfs:Class;
         rdfs:comment "A comment on a review";
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "Comment";
         vs:moreinfo "proposed by iterating.com";
         vs:term_status "testing" .
    
    :Feedback     a rdfs:Class;
         rdfs:comment "Feedback on the review. Expresses whether the review was useful or not";
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "Feedback";
         vs:moreinfo "proposed by iterating.com";
         vs:term_status "testing" .
    
    :commenter     a rdf:Property;
         rdfs:comment "The commenter on the review";
         rdfs:domain <http://www.purl.org/stuff/rev#Comment>,
                <http://www.purl.org/stuff/rev#Feedback>;
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "commenter";
         rdfs:range foaf:Agent;
         vs:moreinfo "proposed by iterating.com";
         vs:term_status "testing" .
    
    :hasComment     a rdf:Property;
         rdfs:comment "Used to associate a review with a comment on the review";
         rdfs:domain <http://www.purl.org/stuff/rev#Review>;
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "hasComment";
         rdfs:range <http://www.purl.org/stuff/rev#Comment>;
         vs:moreinfo "proposed by iterating.com";
         vs:term_status "testing" .
    
    :hasFeedback     a rdf:Property;
         rdfs:comment "Associates a review with a feedback on the review";
         rdfs:domain <http://www.purl.org/stuff/rev#Review>;
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "hasFeedback";
         rdfs:range <http://www.purl.org/stuff/rev#Feedback>;
         vs:moreinfo "proposed by iterating.com";
         vs:term_status "testing" .
    
    :positiveVotes     a rdf:Property;
         rdfs:comment "Number of positive usefulness votes (integer)";
         rdfs:domain <http://www.purl.org/stuff/rev#Review>;
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "positiveVotes";
         rdfs:range rdfs:Literal;
         vs:moreinfo "proposed by iterating.com";
         vs:term_status "testing" .
        
    :title     a rdf:Property;
         rdfs:comment "The title of the review";
         rdfs:domain <http://www.purl.org/stuff/rev#Review>;
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "title";
         rdfs:range rdfs:Literal;
         rdfs:subPropertyOf dc:title;
         vs:moreinfo "proposed by iterating.com";
         vs:term_status "testing" .
    
    :totalVotes     a rdf:Property;
         rdfs:comment "Number of usefulness votes (integer)";
         rdfs:domain <http://www.purl.org/stuff/rev#Review>;
         rdfs:isDefinedBy <http://www.purl.org/stuff/rev>;
         rdfs:label "totalVotes";
         rdfs:range rdfs:Literal;
         vs:moreinfo "proposed by iterating.com";
         vs:term_status "testing" .
 
# the full RDF/XML schema also contain OWL compatibility statements.

# // @@TODO resync with RDF/XML, minRating/maxRating aren't here

6. Contributors & Colophon

Contributions to, and feedback on these documents have been provided by: Leigh Dodds, Victor Lindsay, Alf Eaton, Tom Heath, Benjamin Nowack, Morten Frederikson, Nicolas Vandenberghe

Tools used in the creation of these documents include: Amaya, schemadoc.py, nxml-mode, Pellet

7. License and Copyright

Creative Commons License

Creative Commons 3.0 Attribution : you are free to copy, adapt, distribute and transmit this document and associated schemas. The required attribution is a link back to this document (or the schema), ideally following linked data principles.

8. See Also

Docs

Deployments

9. Changes

2007-10/2007-11 :

2006 :

2005-05-10 :

First Draft 26th September 2003

---------------------------------------------------------------------------------

[@@TODO add a bit of OWL and vocabulary status markers]

[@@TODO update XSLT in SSR example to use this and RVW]

[@@TODO put review:type values in] ??? what did I mean???

[@@TODO make dc:description in RSS feed describe the media - e.g. 'CD single'?] ???check what I meant???

Danny Ayers