Copyright ©2005 W3C ® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
This document describes in brief how to express the content and structure of a thesaurus, and metadata about a thesaurus, in RDF. Using RDF allows data to be linked to and/or merged with other RDF data by semantic web applications. The Semantic Web, which is based on the Resource Description Framework (RDF), provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document is an updated First Public Working Draft published by the Semantic Web Best Practices and Deployment Working Group, part of the W3C Semantic Web Activity. The Working Group intends the Quick Guide to Publishing a Thesaurus on the Semantic Web to become a W3C Working Group Note.
This Quick Guide accompanies the SKOS Core Vocabulary Specification and SKOS Core Guide.
We encourage public comments. Please send comments to public-esw-thes@w3.org [archive] and start the subject line of the message with "comment:".
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
Change History: The initial (previous) version of this document was published with incorrect URIs in the UKAT examples. The URIs used in the previous version resolved to textual descriptions of UKAT concepts and were not intended to be the names of the concepts themselves. This last-minute publication change is corrected in this version.
The Semantic Web provides a common framework that allows data to be shared and reused across application, enterprise, and community boundaries [Semantic Web Activity]. It is based on the Resource Description Framework (RDF) [RDF], which provides a simple data formalism for talking about things, their properties, inter-relationships, and categories (classes). For an overview of RDF, see [RDF Concepts]
This document describes in brief how to express the content and structure of a thesaurus, and metadata about a thesaurus, in RDF. Using RDF allows your data to be linked to and/or merged with other RDF data by semantic web applications. In practice, this means that data sources can be distributed across the web in a decentralised way, but still be meaningfully composed and integrated by applications, often in novel and unanticipated ways.
The examples in this guide are given as a visualisation of the RDF graph, e.g.
An RDF graph can be serialised (i.e. encoded as a series of characters) according to any of three currently defined RDF syntaxes: RDF/XML [RDF Syntax], N3/Turtle [Turtle][N3], N-Triple [N-Triple]. All examples in this guide use the RDF/XML syntax for consistency.
The examples in this document use the SKOS Core Vocabulary, which is a set of properties and classes that can be used to express the conceptual content of a thesaurus as an RDF graph. SKOS Core is designed to be used with not only thesauri, but also other types of 'concept scheme', such as classification schemes, subject heading systems, controlled vocabularies, glossaries, taxonomies etc. For a complete description of SKOS Core, see [SKOS Core Guide].
The examples in this document also use the DCMI Metadata Terms, which are properties and classes for describing resource metadata. For more about DCMI Terms, see [DCMI Terms].
Note that the prefix skos:
in this document stands for http://www.w3.org/2004/02/skos/core#
- so for example skos:prefLabel
is an abbreviation of http://www.w3.org/2004/02/skos/core#prefLabel
.
Below is an extract from the UK Archival Thesaurus (UKAT) [UKAT]:
Term: Economic cooperation Used For: Economic co-operation Broader terms: Economic policy Narrower terms: Economic integration European economic cooperation European industrial cooperation Industrial cooperation Related terms: Interdependence Scope Note: Includes cooperative measures in banking, trade, industry etc., between and among countries.
This example, expressed as an RDF graph using the SKOS Core Vocabulary, looks like:
Each of the blue circles in the image above represents a concept from the UKAT. The red circle represents the UKAT itself.
Each concept from the UKAT has an allocated URI. URIs are globally unique identifiers that may be used to refer to a resource unambiguously from any context. Anything can be a 'resource', not just web documents, therefore URIs can be used as identifiers for anything. For example, the URI:
http://www.ukat.org.uk/thesaurus/concept/1750
... denotes the concept from the UKAT whose preferred term is 'Economic cooperation'. (The URIs are not shown in the visualisation of the graph above for the sake of readability.)
Allocating URIs to the concepts in a thesaurus allows anybody to refer to them unambiguously from any context.
For a complete description of considerations relevant to allocating URIs, see [WEBARCH]. See also the section 'HTTP URIs for Concepts' in [SKOS Core Guide].
An RDF/XML serialisation of the RDF description of the 'Economic cooperation' concept from the UKAT is below:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:skos="http://www.w3.org/2004/02/skos/core#"> <skos:Concept rdf:about="http://www.ukat.org.uk/thesaurus/concept/1750"> <skos:prefLabel>Economic cooperation</skos:prefLabel> <skos:altLabel>Economic co-operation</skos:altLabel> <skos:scopeNote>Includes cooperative measures in banking, trade, industry etc., between and among countries.</skos:scopeNote> <skos:broader rdf:resource="http://www.ukat.org.uk/thesaurus/concept/4382"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/2108"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/9505"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/15053"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/18987"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/3250"/> <skos:inScheme rdf:resource="http://www.ukat.org.uk/thesaurus"/> </skos:Concept> </rdf:RDF>
Note that, in expressing the content of a thesaurus such as the UKAT in RDF using SKOS Core, each descriptor (preferred term) becomes a preferred label for a concept, and each non-descriptor (non-preferred term) becomes an alternative label for a concept.
Note also the skos:inScheme
property - this property may be used to assert a link between a concept and the concept scheme(s) in which it participates. SKOS Core places no restriction on the number of schemes in which a concept may participate.
Most thesauri are managed via a thesaurus management system. Where the thesaurus management system stores its data in a relational database, or in an XML or structured text file format, or where the standard output of the thesaurus management system is an XML or structured text format, it is usually possible to create an RDF representation of the thesaurus via an automated procedure (e.g. database report, text parsing program, XSLT transformation).
A full discussion of conversion techniques and best practice is beyond the scope of this document. However, note that when using an automated procedure, care must be taken to ensure that the output generated is sensible and conforms to the recommended usage of the SKOS Core Vocabulary. For example, if an XML format contains an XML element whose name is 'scopenote' it should not be automatically assumed that the textual content of these elements should be converted to the value of a skos:scopeNote
property. Perhaps these 'scopenote' elements actually contain definitions, in which case the skos:definition
property should be used; or perhaps the 'scopenote' elements have been used very loosely and contain all kinds of note types, in which case the more general skos:publicNote
property would be more appropriate.
Also note that maintaining an RDF representation of a thesaurus requires clear policies for versioning and change management. For example, users need to know if the meaning associated with a URI is stable, and if it isn't they need to know how and when it may change. A fuller discussion of management best practice is currently being undertaken by the Vocabulary Management Task Force of the Semantic Web Best Practices and Deployment Working Group.
RDF can also be used to express metaproperties of a thesaurus, such as it's title, description, date of modification and so on. The DCMI Metadata Terms [DCMI Terms] include a number of useful properties for this purpose. For example, below is an RDF/XML serialisation of the UKAT metadata:
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <skos:ConceptScheme rdf:about="http://www.ukat.org.uk/thesaurus"> <dc:title>The UK Archival Thesaurus</dc:title> <dc:description>A subject thesaurus produced to support indexing in the UK archive sector.</dc:description> <dc:creator>UK Archival Thesaurus project</dc:creator> <dc:date>2004-08-22</dc:date> <dc:language>en</dc:language> <dc:rights>All rights reserved. Data in the UK Archival Thesaurus may be freely used and copied, without prior permission, for educational and other non-commercial purposes. These purposes include (but are not limited to) the incorporation of UKAT data into indexes, thesauri and finding aids created by organisations and projects in the archive sector and the wider heritage sector, in the UK and elsewhere. Under no circumstances may copies of UKAT data be sold without prior written permission from the UKAT Project (support@ukat.org.uk).</dc:rights> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/field/1"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/field/2"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/field/3"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/field/4"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/field/5"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/field/6"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/field/8"/> </skos:ConceptScheme> </rdf:RDF>
See [DCMI Terms] for a description of the recommended usage of these properties.
To make statements about a thesaurus in RDF, the thesaurus must have an allocated URI. For example, the URI:
http://www.ukat.org.uk/thesaurus
... denotes the UKAT itself.
Note that SKOS Core models a thesaurus as a 'concept scheme'. For more about this, see the section 'Concept Schemes' in [SKOS Core Guide].
Note also that, in the example above, a link has been asserted between the UKAT thesaurus and the top concepts in the UKAT thesaurus (in the UKAT they are known as 'fields') using the skos:hasTopConcept
property. Using this property is recommended, as it gives applications an efficient way of locating the top concepts for a given scheme.
The simplest way to publish RDF data is to create one or more RDF documents containing your data, and publish them on the web via a normal HTTP server.
Note that, although the examples above all use the RDF/XML serialisation syntax (i.e. file format), there are two other alternative syntaxes for RDF: N3/Turtle [N3][Turtle] and N-Triples [N-Triples]. For documents containg RDF data in the RDF/XML format, the 'content-type' field in the HTTP header for that document should be 'application/rdf+xml'.
You can also publish your RDF data on the web via a dedicated RDF server such as Joseki [Joseki] or Sesame [Sesame]. Publishing via an RDF server allows anyone to query the thesaurus over the web via an RDF query language such as SPARQL [SPARQL].
Current practice suggests that if you use HTTP URIs as identifiers for your thesaurus and its concepts, then those URIs should dereference to an RDF description of the thing they identify.