40
SKOS Intro Jose María Álvarez-Rodríguez Carlos III University of Madrid [email protected] 1

SKOS intro

Embed Size (px)

DESCRIPTION

A SKOS intro

Citation preview

Page 1: SKOS intro

SKOS Intro

Jose María Álvarez-Rodríguez

Carlos III University of Madrid

[email protected]

1

Page 2: SKOS intro

Table of Contents

• SKOS Step by Step

• Appendix

– A real problem to introduce…

• Semantic Web

• RDF

• Linked Data

2

Page 3: SKOS intro

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

Page 4: SKOS intro

Why an organization system?

• Describe:

– Concepts and

– Concept scheme

• …store

• …retrieve

• …annotate

• …link and merge

– …with existing data

4

Page 5: SKOS intro

SKOS entities

Classes or Categories

• Concept

• Concept Scheme

Properties

• Lexical Labels

• Notation

• Documentation

• Semantic relations

• Mapping

• SKOS-XL (eXtended Labels)

Extensions

5

Page 6: SKOS intro

PROBLEM STATEMENT

“Whenever the pedal of the brake is pressed, the car will decelerate immediately”

6

Page 7: SKOS intro

1-VOCABULARY

“Whenever the pedal of the brake is pressed, the car will decelerate immediately”

7

Page 8: SKOS intro

A “Car” as a system…

8

Sub-system

Related-to

Components of the braking system

Automative Industry

Page 9: SKOS intro

2-Taxonomy

Car

Braking

Subsystem

Pedal …

9

Page 10: SKOS intro

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

Page 11: SKOS intro

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

Page 12: SKOS intro

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

Page 13: SKOS intro

Step 2-Select URIs

km-demo:car

km-demo:car/subsystem/braking

km-demo:car/subsystem/braking/pedal

13

Page 14: SKOS intro

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

Page 15: SKOS intro

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

Page 16: SKOS intro

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

Page 17: SKOS intro

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.

Page 18: SKOS intro

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

Page 19: SKOS intro

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

Page 20: SKOS intro

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

Page 21: SKOS intro

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

Page 22: SKOS intro

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

Page 23: SKOS intro

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

Page 24: SKOS intro

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

Page 25: SKOS intro

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

Page 26: SKOS intro

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

Page 27: SKOS intro

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

Page 28: SKOS intro

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

Page 29: SKOS intro

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

Page 30: SKOS intro

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

Page 31: SKOS intro

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

Page 32: SKOS intro

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

Page 33: SKOS intro

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

Page 34: SKOS intro

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

Page 35: SKOS intro

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

Page 36: SKOS intro

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

Page 37: SKOS intro

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

Page 38: SKOS intro

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

Page 39: SKOS intro

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