<style type="text/css"> code {color: #fff573} small {opacity: .5} .reveal table th { font-size: .5em} .reveal table td { font-size: .5em} .container { background-size: cover; overflow-y: hidden; } .footer { display: none; } </style> ## An Introduction to SKOS with SkoHub-Vocabs Adrian Pohl (hbz), Steffen Rörtgen (GWDG) 2021-11-30, SWIB21, WWW <img src="https://github.com/swibcon/swib-orga/blob/master/logos/swib21-logo.png?raw=true" style="border: none; padding: 5px; background-color: white" width="200px" /> --- ## Session Pad https://pad.gwdg.de/KL890hAAS-OhYTm-07v-uA?both --- ## Agenda 1. Introduction & poll (15 min) 2. Controlled Vocabularies (10 min) 3. SKOS (15 min) 4. SkoHub Vocabs (10 min) 5. Q&A/Discussion (15 min) 6. Break (10 min) 7. Hands-on (50 min) 8. Outlook / Discussion (25 min) --- # 1. Introduction --- ## Adrian & Steffen - Adrian: web librarian, open infrastructure lead at hbz, SWIB co-organizer and programme committee co-chair; working on [lobid](https://lobid.org), SkoHub, [OERSI](https://oersi.de) and other things - Steffen: metadata enthusiast, working on projects related to Open Educational Resources (e.g. https://wirlernenonline.de/) (steffen.roertgen@gwdg.de, Twitter: @steffenr42) --- # Poll --- ## a) Where are you working? --- ## b) Experiences with controlled vocabularies? --- ## c) Experiences with Linked Data and RDF? --- ## d) Experiences with SKOS? --- ## e) Familiar with GitHub? --- # 2. Controlled Vocabularies --- ## Bad: different strings for the same thing ``` "Brauweiler" "Brauweiler, Puhlheim" "Brauweiler <Pulheim>" "Brauweiler, Pulheim" ``` --- ## Good: one controlled value for a thing e.g. `http://www.wikidata.org/entity/Q902505` --- ## Controlled Vocabulary - aka thesaurus, classification, taxonomy, authority file, value list, concept scheme - provides possible values for a metadata field - defines an ID/notation for each term/descriptor - often contains alternative labels/variant names - can be structured as nested hierarchy - may define additional relationships between terms --- ## Main objectives - control the plurality of labels - prevent tpyoes in the metadata - sufficiently identify & distinguish things in a particular domain --- ## Example: ICD-10 [![](https://pad.gwdg.de/uploads/upload_ebd5132838526c16153105540cee88f2.png)](https://icd.who.int/browse10/2019/en) --- ## Example: GND ![](https://pad.gwdg.de/uploads/upload_4f88b5016a7b982ae8b31baef6444812.png) --- ## Example: Dewey Decimal Classification (DDC) ``` 000 Computer science, information & general works 100 Philosophy & psychology 200 Religion 300 Social sciences 400 Language 500 Science 600 Technology 700 Arts & recreation 800 Literature 900 History & geography ``` --- ## Controlled Vocabularies support i18n --- ## Example: DDC-Deutsch ``` 000 Informatik, Informationswissenschaft, allgemeine Werke 100 Philosophie und Psychologie 200 Religion 300 Sozialwissenschaften 400 Sprache 500 Naturwissenschaften und Mathematik 600 Technik, Medizin, angewandte Wissenschaften 700 Künste und Unterhaltung 800 Literatur 900 Geschichte und Geografie ``` --- ## Example: Resource Types (HCRT) [![](https://pad.gwdg.de/uploads/upload_9687b7c5b0b00bc55ccdf51148e8a5ce.png)](https://w3id.org/kim/hcrt/scheme) --- # 3. SKOS --- ## <img src="https://www.w3.org/Icons/SW/Buttons/sw-skos-magenta-v.svg" width=400 style="border: none; box-shadow: none;" /> - SKOS: **S**imple **K**nowledge **O**rganization **S**ystem - a clear and simple RDF-based data model for publishing controlled vocabularies on the web following Linked Data principles - published 2009 as [World Wide Web Consortium (W3C) recommendation](https://www.w3.org/TR/2009/REC-skos-reference-20090818/) - supports the things most people need for most controlled vocabs --- ## Vocabularies as integral part of the web - **resolvable IDs**: a HTTP URI for every vocabulary and each term in it - **links**: terms are linked to the vocabulary they are from, to broader and narrower terms & can contain links to matching terms in other vocabularies - **extensibility**: possibility to add new functions based on other open web standards --- ## Some advantages - web integration - machine-readible - interoperable - re-usable - decoupling data modeling from software development --- ## Resource Description Framework (RDF) - SKOS is encoded in the graph-based data model [RDF](https://en.wikipedia.org/wiki/Resource_Description_Framework) - a set of W3C recommendations for publishing & sharing data on the web - an [abstract model](https://www.w3.org/TR/rdf11-concepts/) with different serialization formats ([RDF/XML](https://www.w3.org/TR/rdf-syntax-grammar/), [Turtle](https://www.w3.org/TR/turtle/), [JSON-LD](https://json-ld.org/)...) --- ## RDF is triples - statements about *resources* in the form of triples (subject - predicate - object) - result: a directed, labeled graph ```graphviz digraph G { rankdir=LR; "Subject"->"Object" [label="Predicate"] } ``` --- ## RDF data - **subject**: resource a statement is about - **predicate**: relation between subject and object - **object**: literal/string or another resource <br> - **subject** and **predicate** are always identified by a URI - **object** is a URI *or* a literal (string, with data type and/or language tag) --- | subject | predicate | object | | -------- | -------- | -------- | | My dog | is called | Lica. | | `<http://example.org/myDog>` | `<https://schema.org/name>` | `"Lica"@de` . | | My dog | likes to | fetch. | | `<http://example.org/myDog>` | `<http://xmlns.com/foaf/0.1/interest>` | `<http://www.wikidata.org/entity/Q621694>` . | --- ## SKOS namespace and prefix - `@prefix skos: <http://www.w3.org/2004/02/skos/core#>.` - all properties and classes of the SKOS model are defined in this namespace --- ## Structure of a SKOS vocabulary Two essential entry types/classes: - `ConceptScheme`: - the vocabulary itself, defined once per vocabulary - general information like title, license - `Concept`: - a vocabulary term - information like label, relations --- ## Important SKOS properties - connecting vocabulary and terms: `hasTopConcept` <-> `topConceptOf`, `inScheme` - preferred label: `prefLabel` - alternative label: `altLabel` - hierarchical informationen: `narrower` <-> `broader` --- ## More properties I - Notation: `notation` - documentation properties: `changeNote`, `definition`, `editorialNote`, `example`, `note`, `historyNote`, `scopeNote` - external relations: `broadMatch`, `narrowMatch`, `exactMatch`, `closeMatch`, `mappingRelation` --- ## More SKOS II - `member`, `memberList` (used with types `Collection`, `OrderedCollection`) - `hiddenLabel` - `broaderTransitive`, `narrowerTransitive`, `related`, `semanticRelation` --- ## Example: AgroVoc - https://agrovoc.fao.org/browse/agrovoc/en/page/c_1666?clang=de - http://aims.fao.org/aos/agrovoc/c_1666.ttl --- # 4. SkoHub Vocabs --- ## Plenty of SKOS-tools already available - [Skosmos](http://skosmos.org/) - [iQvoc](https://iqvoc.net/) - [VocBench](http://vocbench.uniroma2.it/) - ... --- ## Why another publishing tool? - [An exemplary vocab repository](https://github.com/skohub-io/skohub-docker-vocabs/) <br> - **Static Site Generator**: Easy to setup and deploy - **Git-based** workflow - **Integration with GitHub and GitLab** via Webhooks - **"serverless" Hosting** possible (with a bit less functionality) - **machine-friendly**: Same Url for humans and machines --- ## Vocabulary as static HTML - static HTML -> resource friendly - Updates via webhook or GitHub Action - --> vocabulary is always up-to-date --- ## Turtle in git - easy tracking of changes --- ## Create Perma URIs with W3ID or purl - Permanent URIs guarantee sustainability if URLs change - [Guide for setting up Perma URIs](https://git.io/JPWsI) --- ## Features - multilingual - Lookup with FlexSearch - Content Negotiation (HTML/JSON) --- ## Use-Cases - [Metadatenharmonisierung in ETL-Prozessen bei WirLernenOnline](https://doi.org/10.25625/DN1X3A) (german poster about harmonizing metadata in etl-processes using SkoHub-Vocabs) - Standardization processes in KIM: - [Resource Types](https://w3id.org/kim/hcrt/scheme) - [Kompetenzen in der digitalen Welt](http://w3id.org/kim/kmk-vocabs/digitalisierungsbezogene-kompetenzen/) - Publication of a vocabulary: [Kerndatensatz Forschung](https://www.kerndatensatz-forschung.de/index.php?id=forschungsfelder) --- # 5. Questions / Discussion Please also use the [Workshop Pad](https://pad.gwdg.de/KL890hAAS-OhYTm-07v-uA) --- # 6. Break --- # 7. Hands-on --- - Fork [skohub-docker-gh-pages](https://github.com/skohub-io/skohub-docker-vocabs) on GitHub - Build your own vocabulary - Push and publish it --- Fork [skohub-docker-gh-pages](https://github.com/skohub-io/skohub-docker-vocabs) on GitHub ![](https://pad.gwdg.de/uploads/upload_6703ac745e8eacc6c38704fe3ea84887.png) --- ## Modify GitHub-Action - in **your** repo click the folder `.github/workflows` - open file `main.yml` and click the "Edit"-button (✏️) - Line 34: change to **YOUR** GitHub-namen, e.g. `git clone https://github.com/sroertgen/skohub-docker-vocabs.git data/` --- ## Activate GitHub Action ![](https://pad.gwdg.de/uploads/upload_601388c027717ae67026105cf0efc5cd.png) --- ## Publish your site first "Settings", then "Pages" ![](https://pad.gwdg.de/uploads/upload_dc71a66b9bd1ceba34a4d2949784553e.png =600x480) --- ## Setup GitHub Pages I copy the displayed link ![](https://pad.gwdg.de/uploads/upload_1febd1a7580b8f0a1ae89c362654ef07.png) --- ## Setup GitHub Pages II in your repo click here... ![](https://pad.gwdg.de/uploads/upload_8b192b982b4824f3bffa80e98d4878a3.png) --- ## Setup GitHub Pages III ...and insert the link here ![](https://pad.gwdg.de/uploads/upload_1e5170bea3b0d6b8a81572192f599975.png) --- ## Edit the file `colors.ttl` ![](https://pad.gwdg.de/uploads/upload_baf5db89d252198bef4a3643d27ee824.png) --- ## Build your vocabulary - add more colors - add hierarchies <br> - [Turtle Web Editor](https://felixlohmeier.github.io/turtle-web-editor/) (zur Validierung) --- ## Example: Add hierarchy siehe auch [colors_with_hierarchy.ttl](https://github.com/skohub-io/skohub-docker-vocabs/blob/master/colors_with_hierarchy.ttl) ```turtle @prefix color: <https://example.org/color/> . @prefix dct: <http://purl.org/dc/terms/> . @prefix skos: <http://www.w3.org/2004/02/skos/core#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . color: a skos:ConceptScheme ; dct:title "Colors"@en, "Farben"@de ; dct:creator "Hans Dampf"@de ; dct:created "2021-11-02"^^xsd:date ; dct:license <https://creativecommons.org/publicdomain/zero/1.0/> ; skos:hasTopConcept color:b0001, color:b0002 . color:b0001 a skos:Concept ; skos:prefLabel "Violett"@de, "violet"@en ; skos:altLabel "lila"@de, "purple"@en ; skos:topConceptOf color: . color:b0002 a skos:Concept ; skos:prefLabel "Green"@en, "Grün"@de ; skos:narrower color:b0003 ; skos:topConceptOf color: . color:b0003 a skos:Concept ; skos:prefLabel "Light green"@en, "Hellgrün"@de ; skos:broader color:b0002 ; skos:inScheme color: . ``` --- ## Add a link to your vocabulary in the pad [Pad](https://pad.gwdg.de/KL890hAAS-OhYTm-07v-uA#Workshop-Results) --- ## 8. Outlook and discussion - improve webdesign - add more config options (siehe z.B. [#75](https://github.com/skohub-io/skohub-vocabs/issues/75)) - support `skos:Collection` ([#159](https://github.com/skohub-io/skohub-vocabs/issues/159)) - reconciliation ([skohubpubsub#54](https://github.com/skohub-io/skohub-pubsub/issues/54)) - use SKOS/SkoHub Vocabs for a decentralized, push-based discovery infrastructure --- ## Don't forget the open license! (These slides are licensed unter [CC0](https://creativecommons.org/share-your-work/public-domain/cc0/) and we recommend the same for SKOS-vocabularies.) ![CC0 button](https://licensebuttons.net/p/zero/1.0/88x31.png) --- ## Links - German: [Einführung in SKOS am Beispiel von Open Educational Resources (OER)](https://dini-ag-kim.github.io/skos-einfuehrung/#/) - German: [Metadatenharmonisierung in ETL-Prozessen mit SkoHub im Projekt WirLernenOnline](https://doi.org/10.25625/DN1X3A) - [SKOS Testing Tool](https://skos-play.sparna.fr/skos-testing-tool/home)
{"title":"An Introduction to SKOS with SkoHub-Vocabs","lang":"en","type":"slide","slideOptions":{"transition":"none","theme":"dark"},"tags":"skohub, skos, introduction"}