SKOS Intro
Jose María Álvarez-Rodríguez
Carlos III University of Madrid
1
Table of Contents
• SKOS Step by Step
• Appendix
– A real problem to introduce…
• Semantic Web
• RDF
• Linked Data
2
SKOS…
• Simple
• Knowledge
• Organization
• System
• Thesauri
• Controlled vocabularies
• Classifications
• Taxonomies
• Folksonomies
• …
• It is a domain-specific Semantic Web vocabulary
• …an OWL ontologyRDF-based model 3
Why an organization system?
• Describe:
– Concepts and
– Concept scheme
• …store
• …retrieve
• …annotate
• …link and merge
– …with existing data
4
SKOS entities
Classes or Categories
• Concept
• Concept Scheme
Properties
• Lexical Labels
• Notation
• Documentation
• Semantic relations
• Mapping
• SKOS-XL (eXtended Labels)
Extensions
5
PROBLEM STATEMENT
“Whenever the pedal of the brake is pressed, the car will decelerate immediately”
6
1-VOCABULARY
“Whenever the pedal of the brake is pressed, the car will decelerate immediately”
7
A “Car” as a system…
8
Sub-system
Related-to
Components of the braking system
Automative Industry
2-Taxonomy
Car
Braking
Subsystem
Pedal …
…
…
9
Step 1-Modeling Concepts in SKOS
• Create a skos:ConceptScheme
– To collect all skos:Concept in a KOS
• Create a skos:Concept for each entity
10
Tip 1-URI design scheme
• Objective:
– Define an URI base
• Concept Scheme and Concepts • <uri_base>/<project>/<system>/<id>
• How to: • Slash vs Hash URIS
• ID URIs – E.g. http://thereusecompany/km/demo/1
• Named URIs
– E.g. http://thereusecompany/km/demo/car
• We will use the prefix km-demo to refer to the URI http://thereusecompany/km/demo/
11
URI Scheme
• URIs for things should be designed to:
– uniquely name the thing that they name
– be in use for a long time
– be short and human readable
– incorporate existing identifiers where available
http://data.gov.uk/resources/uris
• Human-readable URIs?
• Minted URIs? (Am I the owner of the domain?)
– Avoid URIs such as: http://example.org/
http://patterns.dataincubator.org/book/identifier-patterns.html 12
Step 2-Select URIs
km-demo:car
km-demo:car/subsystem/braking
km-demo:car/subsystem/braking/pedal
…
…
13
FAQ 1-What happened if the ID contains more than 1 word or punctuation marks?
• Concept “Pedal of the brake”
– km-demo:car/subsystem/braking/pedal_of_the_brake
• It could be better to use just an ID
– km-demo:car/subsystem/braking/com1
14
Step 3-Create skos:Concept
km-demo:car a skos:Concept .
km-demo:car/subsystem/braking a
skos:Concept .
km-demo:car/subsystem/braking/pedal a
skos:Concept .
15
Tip 2-Define our own concepts
• Objective: – Create our own Categories instead of using skos:Concept
• How to:
– Define a new category rdfs:subClassOf skos:Concept
16
New categories…
17
km-demo:System rdfs:subClassOf skos:Concept.
km-demo:car a km-demo:System.
km-demo:SubSystem rdfs:subClassOf skos:Concept ;
skos:broader km-demo:System.
km-demo:car/subsystem/braking a km-demo:SubSystem.
km-demo:Component rdfs:subClassOf skos:Concept ;
skos:broader km-demo:SubSystem.
km-demo:car/subsystem/braking/pedal a km-demo:Component.
Step 4-Add Authoring properties to skos:Concept
jose-foaf: http://www.josemalvarez.es/foaf.rdf#.
km-demo:car a km-demo:System ;
dcterms:author jose-foaf:me;
dcterms:created
“2013-10-10"^^xsd:date ;
dcterms:modified
"2013-10-10"^^xsd:date ;.
18
Tip 3-Link to existing vocabularies
• Objective: – Reuse existing data and definitions to enrich concepts.
• How to:
– Try to use widely-accepted vocabularies
• Dublin-Core Terms (metadata)
• Friend Of A Friend (people)
• Organizations ontology (organizations)
• …
– Avoid the creation of vocabularies from the scratch
19
Step 5-Add Labeling properties to skos:Concept
km-demo:car a km-demo:System ;
rdfs:label “Car”@en;
skos:prefLabel “Car”@en;
skos:prefLabel “Voiture”@fr;
skos:altLabel “Motor”@en;
skos:altLabel “Bus”@en;
skos:altLabel “Wagon”@fr;
skos:hiddenLabel “Auto-bus”@en;
.
.
Multilingual Support!
20
Tip 4-Use 1 preferred Label
• Objective: – No two concepts should have the same preferred Label
in a given language.
– Concept descriptor
• How to:
– Use just one skos:prefLabel per concept
– Add more labels through skos:altLabel and skos:hiddenLabel to specify more labels
Interoperability enabler
21
Tip 5-Use a rdfs:label
• Objective: – Label all RDF resources
• How to:
– Define a rdfs:label per RDF resource
km-demo:car rdfs:label “Car”@en.
http://patterns.dataincubator.org/book/label-everything.html 22
Step 6-Add notation properties to skos:Concept
km-demo:car a km-demo:System ;
skos:notation "c1"^^xsd:string ;
dcterms:subject "1"^^xsd:string ;
km-demo:level "1";.
23
Tip 6-Create my own notation property
• Objective: – I want to specialize some notation property
• E.g. Some property to indicate the level in the hierarchy
• How to:
– Define a new property specifying domain and range
km-demo:level a owl:DatatypeProperty;
rdfs:subClassOf skos:note;
rdfs:label "Level in the hierarchy"@en ;
rdfs:domain skos:Concept;
rdfs:range xsd:int;
. 24
Step 7-Add documentation properties to skos:Concept
km-demo:car a km-demo:System ;
skos:changeNote
"An example of change note."@EN;
skos:editorialNote
"An example of editorial note"@EN;
skos:historyNote
"An example of history note"@EN;
skos:scopeNote
"An example of scope note"@EN;.
.
Multilingual Support!
25
Tip 7-Select hierarchy properties
• Objective: – I want to define semantic relationships to create an
hierarchy
• How to:
– If non-transitive hierarchy properties are required… • skos:broader and skos:narrower
– otherwise...use the transitive version… • skos:broaderTransitive and skos:narrowerTransitive
– if symmetric properties are required... skos:related
26
Step 8-Add semantic properties to skos:Concept
km-demo:car a km-demo:System ;
skos:narrower
km-demo:car/subsystem/braking.
km-demo:car/subsystem/braking a km-demo:SubSystem ;
skos:narrower
km-demo:car/subsystem/braking/pedal.
• skos:broader properties can be inferred by a semantic web reasoner (be careful)
– broader(x,y)->narrower(y,x)
• Is the relation between “Braking System” and “Pedal” a broader/narrower one?
maybe part-of…
27
Tip 8-Create my own related property
• Objective: – I want to specialize some related property
• E.g. Some property to link concepts but asymmetric
• How to:
– Define a new property specifying domain, range and behavior
km-demo:related-to rdfs:subClassOf skos:semanticRelation;
a owl:AsymmetricObjectProperty;
rdfs:label "Related but asymetric property"@en ;
rdfs:domain skos:Concept;
rdfs:range skos:Concept;
. 28
Step 8.1-Using related…
km-demo:Automative a skos:Concept;
…
.
km-demo:car a km-demo:System ;
km-demo:related-to
km-demo:Automative;
.
29
Tip 9-Part-of property • Objective:
– A broader property can be interpreted as a “part-of” relationship
– The first SKOS draft spec. included “broaderPartitative” but it was finally excluded
• http://www.w3.org/2004/02/skos/extensions/spec/2004-10-18.html#broaderPartitive
• How to:
– Keep the semantics of broader relationships
– Define your own property
km-demo:part-of rdfs:subClassOf skos:broader;
a owl:ObjectProperty;
rdfs:label “Part-of relationships"@en ;
rdfs:domain skos:Concept;
rdfs:range skos:Concept;
. 30
Step 8.2-Using part-of…
km-demo:car/subsystem/braking/pedal
a km-demo:Component ;
km-demo:part-of
km-demo:car/subsystem/braking;
.
31
Step 9-Add mapping properties to skos:Concept
km-demo2:http://http://thereusecompany/km/demo2/.
dbpedia-res:http://dbpedia.org/resource/
km-demo:car a km-demo:System ;
skos:closeMatch dbpedia-res:Automobile;
skos:exactMatch km-demo2:otherCar;
skos:broadMatch <URI>;
skos:relatedMatch <URI>; .
• Transversal links
• Improve hierarchy browsing
• Be aware of logical implications (in case of reasoning)
• Try to give a confidence value
• …
32
Step 10-Add skos:Concept to a Concept Scheme
km-demo:car skos:inScheme
<http://thereusecompany/km/demo/ds> .
km-demo:car/subsystem/braking
skos:inScheme
<http://thereusecompany/km/demo/ds> .
km-demo:car/subsystem/braking/pedal
skos:inScheme
<http://thereusecompany/km/demo/ds> .
33
Step 11-Describe the concept scheme
<http://thereusecompany/km/demo/1381307095/ds> a
void:Dataset , skos:ConceptScheme ;
rdfs:label "Taxonomy from project Demo"@en ;
dcterms:author <http://www.josemalvarez.es/foaf.rdf#me> ;
dcterms:contributor km-people:JM, km-people:JuanLlorens;
dcterms:description "Demo Vocabulary and Taxonomy" ;
dcterms:license <http://opendatacommons.org/licenses/by/1.0/> ;
dcterms:modified "2013-10-10"^^xsd:date ;
dcterms:publisher km-org:TRC ;
dcterms:source <http://thereusecompany/km/demo/demo.xls> ;
dcterms:title "Demo Vocabulary" ;
void:dataDump
<http://http://thereusecompany/km/demo/1381307095/demo-1381307095.ttl> ;
void:dataDump
<http://http://thereusecompany/km/demo/1381307095/demo-1381307095.rdf> ;
void:exampleResource
<http://thereusecompany/km/demo/1381307095/car>
void:uriRegexPattern
"http://thereusecompany/km/demo/.+" ;
void:vocabulary skos: , dcterms: , rdfs:, km-demo: ;
skos:hasTopConcept <http://http://thereusecompany/km/demo/car>;
foaf:homepage <http://thereusecompany.com> .
34
A SKOS-based “Car” km-demo2:http://http://thereusecompany/km/demo2/.
dbpedia-res:http://dbpedia.org/resource/
<http://thereusecompany/km/demo/1381307095/car> a km-demo:System;
dcterms:author jose-foaf:me;
dcterms:created “2013-10-10"^^xsd:date ;
dcterms:modified "2013-10-10"^^xsd:date ;.
rdfs:label “Car”@en;
skos:prefLabel “Car”@en;
skos:prefLabel “Voiture”@fr;
skos:altLabel “Motor”@en;
skos:altLabel “Bus”@en;
skos:altLabel “Wagon”@fr;
skos:hiddenLabel “Auto-bus”@en;
skos:notation "c1"^^xsd:string ;
dcterms:subject "1"^^xsd:string ;
km-demo:level "1";
km-demo:related-to km-demo:Automative;
skos:changeNote "An example of change note."@EN;
skos:editorialNote "An example of editorial note"@EN;
skos:historyNote "An example of history note"@EN;
skos:scopeNote "An example of scope note"@EN;.
skos:narrower km-demo:car/subsystem/braking.
skos:closeMatch dbpedia-res:Automobile;
skos:exactMatch km-demo2:otherCar;
skos:inScheme <http://thereusecompany/km/demo/1381307095/ds>.
35
A SKOS-based “Braking” system
km-demo:car/subsystem/braking a km-demo:SubSystem ;
…
skos:inScheme <http://thereusecompany/km/demo/ds> .
km-demo:car/subsystem/braking/pedal a km-demo:Component ;
…
km-demo:part-of km-demo:car/subsystem/braking;
skos:inScheme <http://thereusecompany/km/demo/ds> .
36
SKOS Concept Template <base_uri>/km/<project>/<timestamp>/<concept_id> <concept_id> :: c[0-9]+ a skos:Concept ; #----------1-Authoring properties dcterms:*---------------------- dcterms:author <URI>; dcterms:created "2013-10-10"^^xsd:date ; dcterms:modified "2013-10-10"^^xsd:date ; #----------2-Lexical labels---------------------- rdfs:label "Foo label"@LANG; skos:prefLabel "Foo preferred label"@LANG; skos:altLabel ”Foo alternative label"@LANG; #----------3-Documentation properties skos:changeNote "Change note"@LANG; skos:editorialNote "Editorial note"@LANG; skos:historyNote "History note"@LANG; skos:scopeNote "Scope note"@LANG; #----------4-Notation properties skos:notation "id"^^xsd:string ; dcterms:subject "id, subject,..."^^xsd:string ; km:level "1"; #----------5-Semantic and hierarchy properties # if symmetric properties are required... skos:related <URI>; # otherwise km:related <URI>; # if non-transitive hierarchy properties are required...Moreover we could only serialize one of them, the other can be inferred: skos:narrower <URI>; skos:broader <URI>; # otherwise...use the transitive version...that can also be inferred. skos:narrowerTransitive <URI>; skos:broaderTransitive <URI>; #----------6-Mapping properties skos:closeMatch|exactMatch... <URI>; #----------7-Concept Scheme skos:inScheme <URI> ; . 37
SKOS Benefits
• A concept-oriented model
• RDF-based
– a common and shared data model
• Crucial contribution to interoperability
• A way of porting KOS to RDF
• Align to existing standards (ISO 25964)
• Lightweight reasoning
• Simple but powerful
• Extensible
• …
38
SKOS is being used…
• Most of the semantic web-based vocabularies
– E.g. The RDF Data Cube Vocabulary • Porting the SDMX standard for statistics to RDF
• Most of the semantic web-based vocabularies
• To Boost the Linked Data initiative…
What’s next…
• SKOS-XL (eXtensions for Labels)
• W3C Provenance and Trust
39
References
• http://www.w3.org/TR/skos-reference/
• http://www.iskouk.org/presentations/isaac_21072008.pdf
• http://www.w3.org/2004/02/skos/references
40