PublishingThesauriPrimerToc
A Quick Guide to Publishing a Thesaurus on the Semantic Web
A super-quick start guide, using concrete examples.
Short as poss (aim for 3 pages max).
- Thesaurus
- Thesaurus with node labels
- Thesaurus metadata
- Publishing
Begin text of document:
A Quick Guide to Publishing a Thesaurus on the Semantic Web
Abstract
This document is a quick guide to creating an RDF description of a thesaurus, and of thesaurus metadata, and publishing these on the web.
Publishing an RDF Description of the Thesaurus
The first step to publishing a thesaurus on the semantic web is to create an RDF description of the thesaurus.
Here we use the UK Archival Thesaurus [ref] as an example.
Below is an extract from the 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.
Below is an RDF description of this extract, encoded as an XML document using the RDF/XML syntax:
<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:inScheme rdf:resource="http://www.ukat.org.uk/thesaurus"/> <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:Concept> </rdf:RDF>
This short XML document encodes an RDF description of a single concept from the UKAT.
A complete RDF description of the UKAT obviously includes RDF descriptions of all UKAT concepts. In an RDF/XML document such as the above, any number of skos:Concept
elements may be contained within the root rdf:RDF
element.
Concepts and URIs
To support use of your thesaurus within semantic web applications, we strongly recommend that you assign URIs to identify both the thesaurus itself, and each of the concepts in the thesaurus.
In the above example, the URI ...
http://www.ukat.org.uk/thesaurus
... identifies the UK Archival Thesaurus, and the URI ...
http://www.ukat.org.uk/thesaurus/concept/1750
... identifies the concept from UKAT for which the term 'Economic cooperation' is the descriptor.
There are a number of options and issues related to choosing URIs for thesaurus concepts. For a complete description of these issues, see the VM TF note [ref].
About SKOS Core
The RDF description above uses the SKOS Core schema, which we recommend for publishing thesauri on the semantic web.
SKOS Core supports a number of additional features not described in this document - see the SKOS Core Specification and SKOS Core Guide [ref] for an overview and full description of these features.
Publishing Thesaurus Metadata
We also recommend that you publish metadata about the thesaurus itself, as an RDF description.
Below is an RDF description of the UKAT metadata, encoded as an XML document using the RDF/XML syntax:
<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:format>text</dc:format> <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/concept/1"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/concept/2"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/concept/3"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/concept/4"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/concept/5"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/concept/6"/> <skos:hasTopConcept rdf:resource="http://www.ukat.org.uk/thesaurus/concept/8"/> </skos:ConceptScheme> </rdf:RDF>
In the example above, elements from the Dublin Core vocabulary have been used to describe thesaurus metadata. Note that, elements from any element set with an RDF binding (such as DC and DC Terms) may be used to describe thesaurus metadata.
Publication Options
Once you have an RDF description of your thesaurus, and of your thesaurus metadata, publish these on the web.
Probably the simplest way to publish an RDF description on the web is to encode it as an XML document (as in the above examples), and publish this document on the web as a file on an HTTP or FTP server.
Note that there are a number of alternative encoding syntaxes for RDF descriptions (RDF/XML [ref], N-Triple [ref], Turtle [ref]), all of which may be used.
Note also that there are dedicated RDF servers (e.g. Joseki), through which RDF data may be exposed to the web.
Further Reading
- SKOS Core Specification
- SKOS Core Guide
- Some note about term URIs options and issues
@@TODO
End text of document
N3 Turtle serialisation of the example:
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>. @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>. @prefix skos: <http://www.w3.org/2004/02/skos/core#>. @prefix ukat: <http://www.ukat.org.uk/thesaurus/concept/>. ukat:1750 a skos:Concept; skos:prefLabel 'Economic cooperation'; skos:altLabel 'Economic co-operation'; skos:scopeNote 'Includes cooperative measures in banking, trade, industry etc., between and among countries.'; skos:inScheme <http://www.ukat.org.uk/thesaurus>; skos:broader ukat:4382; skos:narrower ukat:2108; skos:narrower ukat:9505; skos:narrower ukat:15053; skos:narrower ukat:18987; skos:related ukat:3250.
Alternative extract/snippet pairs:
Term: Cultural philosophy Used For: Concept of culture Broader terms: Culture Narrower terms: Enlightenment Related terms: Cultural values
<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/2323"> <skos:prefLabel>Cultural philosophy</skos:prefLabel> <skos:altLabel>Concept of culture</skos:altLabel> <skos:inScheme rdf:resource="http://www.ukat.org.uk/thesaurus"/> <skos:broader rdf:resource="http://www.ukat.org.uk/thesaurus/concept/1929"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/12894"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/4544"/> </skos:Concept> </rdf:RDF>
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.
<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:inScheme rdf:resource="http://www.ukat.org.uk/thesaurus"/> <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:Concept> </rdf:RDF>
Term: Culture Used For: * Communism and culture * Culture and creativity * Politics and culture * Religion and culture * Socialism and culture Narrower terms: * Civilization * Cultural history * Cultural philosophy * Cultural sociology * Intellectual life Related terms: * Cultural change * Cultural conditions * Cultural creation * Cultural differentiation * Cultural identity * Cultural information * Cultural research * Cultural systems * National cultures Scope Note: Use more specific descriptor.
Below is an RDF description of this extract:
<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/1929"> <skos:prefLabel>Culture</skos:prefLabel> <skos:altLabel>Communism and culture</skos:altLabel> <skos:altLabel>Culture and creativity</skos:altLabel> <skos:altLabel>Politics and culture</skos:altLabel> <skos:altLabel>Religion and culture</skos:altLabel> <skos:altLabel>Socialism and culture</skos:altLabel> <skos:scopeNote>Use more specific descriptor.</skos:scopeNote> <skos:inScheme rdf:resource="http://www.ukat.org.uk/thesaurus"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/899"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/894"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/2323"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/6260"/> <skos:narrower rdf:resource="http://www.ukat.org.uk/thesaurus/concept/13236"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/1931"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/1930"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/929"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/2578"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/143"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/1351"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/5918"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/2393"/> <skos:related rdf:resource="http://www.ukat.org.uk/thesaurus/concept/2392"/> <rdfs:seeAlso rdf:resource="http://www.ukat.org.uk/thesaurus/term.php?i=1929"/> </skos:Concept> </rdf:RDF>