Milan Dojchinovski, Jan Forberg, Johannes Frey, Marvin Hofer, Denis Streitmatter and Sebastian Hellmann and many more
DBpedia Knowledge Graph Tech Tutorial
1
Meet the Organizers
Milan Dojchinovski Marvin Hofer Denis Streitmatter Julia Holze
Jan Forberg Johannes Frey Sebastian Hellmann
2
All members of the DBpedia core team hosted by:
Institute of Applied Informatics / DBpedia Association, Leipzig, DE
https://tinyurl.com/DBpediaTechTut
About the tutorial
3
https://tinyurl.com/DBpediaTechTut
Agenda
Break (15 min)
4
https://tinyurl.com/DBpediaTechTut
Guidelines
5
https://tinyurl.com/DBpediaTechTut
PART 1: Getting Started with DBpedia
6
Session 1: DBpedia in a Nutshell
7
by Milan Dojchinovski
History
2007 - A crowd-sourced community effort to extract structured information from Wikipedia and make this information available on the Web.
2021 - Current mission: Global and unified access to knowledge graphs
8
https://tinyurl.com/DBpediaTechTut
The Power of the DBpedia Knowledge Graph
Main SPARQL endpoint: https://dbpedia.org/sparql
SELECT ?person ?name ?country ?population WHERE {
?person a dbo:Person .
?person rdfs:label ?name .
?person dbo:birthPlace ?countryOfBirth .
?countryOfBirth dbo:populationTotal ?population .
FILTER (langMatches( lang(?name), "en" ) )
}
Simple example: “persons, their names in English, their birth country and country population”
9
https://tinyurl.com/DBpediaTechTut
The Power of the DBpedia Knowledge Graph
Main SPARQL endpoint: https://dbpedia.org/sparql
SELECT DISTINCT ?person ?name ?countryOfBirth ?population ?team ?stadium ?stadiumCapacity WHERE {
?person a dbo:Person .
?person rdfs:label ?name .
?person dbo:birthPlace ?countryOfBirth .
?countryOfBirth dbo:populationTotal ?population .
?person dbo:team ?team .
?person dbo:position|dbp:position <http://dbpedia.org/resource/Goalkeeper_(association_football)> .
?team dbo:stadium ?stadium .
?stadium dbo:seatingCapacity ?stadiumCapacity .
FILTER (langMatches( lang(?name), "EN" ) )
FILTER (?stadiumCapacity > 30000)
FILTER (?population > 10000000)
}
ORDER BY DESC(?stadiumCapacity)
More complex example: “soccer players, who are born in a country with more than 10 million inhabitants, who played as goalkeeper for a club that has a stadium with more than 30.000 seats.”
10
https://tinyurl.com/DBpediaTechTut
DBpedia Milestones
11
https://tinyurl.com/DBpediaTechTut
DBpedia is about connecting People and Orgs
12
https://tinyurl.com/DBpediaTechTut
Organizational Structure in Numbers
13
https://tinyurl.com/DBpediaTechTut
Organizational Structure
14
https://tinyurl.com/DBpediaTechTut
DBpedia Association Members
Fast growing Knowledge Engineering & Linked Data Lobby
15
https://tinyurl.com/DBpediaTechTut
Overarching DBpedia KG Release Process
16
1. Mappings, ontology definitions
2. Knowledge extraction
3. Data validation
4. Release of data artifacts
5. ID management and fusion
6. KG Deployment
https://tinyurl.com/DBpediaTechTut
The DBpedia Infrastructure
17
https://tinyurl.com/DBpediaTechTut
Czech DBpedia
18
https://tinyurl.com/DBpediaTechTut
4+2 Main Dataset Groups
Available extractions, 22 billion facts total (500GB without text)
… bonus:
Based on the Wikimedia XML dumps
19
https://tinyurl.com/DBpediaTechTut
Mappings-based Extraction
20
https://tinyurl.com/DBpediaTechTut
Mappings Example
21
{{ PropertyMapping | templateProperty = area_total_km2 | ontologyProperty = areaTotal | unit = squareKilometre }}
{{ PropertyMapping | templateProperty = area_urban_km2 | ontologyProperty = areaUrban | unit = squareKilometre }}
dbr:Prague
dbo:areaTotal 496000000.0 ;
dbo:areaUrban 298000000.0 .
https://tinyurl.com/DBpediaTechTut
Generic Extraction
22
https://tinyurl.com/DBpediaTechTut
Generic Extraction Example
23
dbr:Prague
dbp:name "Prague"@en ;
dbp:nativeName "Praha"@en .
Output triples:
https://tinyurl.com/DBpediaTechTut
Text Extraction
Extraction executed every 3-4 months.
24
https://tinyurl.com/DBpediaTechTut
Wikidata Extraction
https://databus.dbpedia.org/dbpedia/wikidata
Benefit: Unified access over Wikipedia
and Wikidata
25
https://tinyurl.com/DBpediaTechTut
DBpedia Ontology
26
https://tinyurl.com/DBpediaTechTut
DBpedia Ontology (cont.)
Browse the ontology
27
https://tinyurl.com/DBpediaTechTut
DBpedia SPARQL Endpoints
Three core SPARQL endpoints:
28
https://tinyurl.com/DBpediaTechTut
Innovation: DBpedia KG Diamonds
DBpedia Diamonds: aggregated, ready-to-use, knowledge graphs from Wikipedia/Wikidata and Linked Open Data (LOD).
For more see: https://www.dbpedia.org/resources/knowledge-graphs/
29
https://tinyurl.com/DBpediaTechTut
DBpedia KG Diamonds Comparison
30
https://tinyurl.com/DBpediaTechTut
Impact of DBpedia
31
https://tinyurl.com/DBpediaTechTut
Session 2: Getting Started
32
by Jan Forberg
Where can I find DBpedia Data?
33
DBpedia Data
A set of files containing RDF data
https://tinyurl.com/DBpediaTechTut
Where can I find DBpedia Data?
34
OpenLink Virtuoso Triple Store
Option A: The official SPARQL-Endpoint
SPARQL Endpoint
Access at https://dbpedia.org/sparql
https://tinyurl.com/DBpediaTechTut
Where can I find DBpedia Data?
35
DBpedia file server
Option B: File Download
Your machine
Download
Access at https://downloads.dbpedia.org
https://tinyurl.com/DBpediaTechTut
Where can I find DBpedia Data?
36
The DBpedia Databus
DBpedia file server
Option C: The DBpedia Databus
SPARQL Endpoint
Access at https://databus.dbpedia.org
Access at https://databus.dbpedia.org/repo/sparql
Your machine
Download
RDF metadata
https://tinyurl.com/DBpediaTechTut
Where can I find DBpedia Data?
37
The DBpedia Databus
DBpedia file server
Option D: The Latest-Core Collection
Access at https://databus.dbpedia.org
Your machine
Download
Databus Collection
https://tinyurl.com/DBpediaTechTut
DBpedia Databus Collections
Use, create and share Databus Collections
What is a Databus Collection?
Why use Databus Collections?
38
https://tinyurl.com/DBpediaTechTut
Where can I find DBpedia Data?
39
Your machine
DBpedia Latest-Core Collection
3 Lines of Bash Script
+
YOU
+
=
Option D: The Latest-Core Collection
https://tinyurl.com/DBpediaTechTut
Where can I find DBpedia Data?
40
Option E: Access through public DBpedia Services
https://tinyurl.com/DBpediaTechTut
How to use the DBpedia data?
Only process the data that you actually need
Option C (Databus) can help
41
https://tinyurl.com/DBpediaTechTut
DBpedia Databus Artifacts
42
The DBpedia Databus
A File Server
.ttl
.xml
https://tinyurl.com/DBpediaTechTut
Important DBpedia Artifacts
43
https://tinyurl.com/DBpediaTechTut
Choosing a Databus Groups
A Databus Group groups multiple Artifacts with common attributes.
DBpedia Artifacts are grouped by Extraction Type:
44
https://tinyurl.com/DBpediaTechTut
DBpedia Artifact: Labels
45
https://tinyurl.com/DBpediaTechTut
DBpedia Artifact: Geo-Coordinates
Acccess: https://databus.dbpedia.org/dbpedia/generic/geo-coordinates/
Tasks:
46
https://tinyurl.com/DBpediaTechTut
DBpedia Artifact: Instance Types
47
https://tinyurl.com/DBpediaTechTut
DBpedia Artifact: Mappingbased Objects
Access: https://databus.dbpedia.org/dbpedia/mappings/mappingbased-objects/
Tasks:
48
https://tinyurl.com/DBpediaTechTut
Bonus Artifact: The Databus Itself
Databusception!
�
49
https://tinyurl.com/DBpediaTechTut
DBpedia Website Demo
50
https://tinyurl.com/DBpediaTechTut
Aggregating multiple Artifacts
51
Your machine
DBpedia Latest-Core Collection
3 Lines of Bash Script
+
YOU
+
=
https://tinyurl.com/DBpediaTechTut
Aggregating multiple Artifacts
52
Your machine
Any Databus
Collection
3 Lines of Bash Script
+
YOU
+
=
The exact data you need for the task at hand
or a comparable amount of LOC in any programming language
https://tinyurl.com/DBpediaTechTut
Session 3:
Dutch National Knowledge Graph
DBpedia`s Blueprint for Creating National Knowledge Graphs
53
by Johannes Frey
National Knowledge Graphs (NKGs)
54
https://tinyurl.com/DBpediaTechTut
Dutch National Knowledge Graph (DNKG)
55
DBLP
Dutch DBpedia
Kadaster BAG
Dutch nat. library (KB)
Cultural Heritage Objects
RKD Artists
DNKG
https://tinyurl.com/DBpediaTechTut
DNKG in Numbers & Clustering State
56
https://tinyurl.com/DBpediaTechTut
DNKG: Analyze Linkage State by Types
57
https://tinyurl.com/DBpediaTechTut
Research Questions and Challenges
Creating NKGs:
58
https://tinyurl.com/DBpediaTechTut
NKG Creation Blueprint
59
https://tinyurl.com/DBpediaTechTut
DBpedia Knowledge Cartridges
60
Pixabay License
https://tinyurl.com/DBpediaTechTut
GFS Data and Provenance Browser (Demo)
61
https://tinyurl.com/DBpediaTechTut
Analytical SPARQL Query on NKG
62
https://tinyurl.com/DBpediaTechTut
Greedy Mappings using DBpedia Ontology
63
https://tinyurl.com/DBpediaTechTut
Direct vs. pt-Construct Mappings
64
https://tinyurl.com/DBpediaTechTut
Stay tuned...
Technical details about DNKG follow in as part of the next session “DBpedia Technology Stack”
65
https://tinyurl.com/DBpediaTechTut
Break
15 minutes
66
PART 2: Deep into the DBpedia Ecosystem
67
Session 4:
DBpedia Technology Stack
68
by Jan Forberg, Johannes Frey and Denis Streitmatter
The Databus Technology Stack
The Databus stack is a range of applications and services based on the Databus that allows you to host your own data or build your own applications on top of the stack.
69
Databus Platform
Databus Collections (or SPARQL queries)
on-demand SPARQL stores
on demand
Lookup Search
Mods
Overlay Search
https://tinyurl.com/DBpediaTechTut
The Databus Platform
70
by Jan Forberg
The DBpedia Databus
71
The DBpedia Databus
Some file server
Access at https://databus.dbpedia.org
Your machine
Download
Collections
https://tinyurl.com/DBpediaTechTut
Databus - Digital Factory Platform
Registry of files on the Web
72
https://tinyurl.com/DBpediaTechTut
Databus - Digital Factory Platform
… but very strict metadata
73
Rejected Approved
https://tinyurl.com/DBpediaTechTut
Benefits
74
https://tinyurl.com/DBpediaTechTut
The Databus Address Space
Registered data is structured hierarchically (similar to maven repositories). A simple file upload without thought how it could be structured for reuse and maintenance is not possible/allowed. �
75
Publisher (Mike)
Group A (Animals)
Artifact A (Cats)
Artifact B (Dogs)
Version 2
Group B
Version 3
Version 1
Version 3
File F1
type =good
File F2
type =evil
File F1
type =good
File F2
type =evil
File F1
type =great
File F1
type =great
https://tinyurl.com/DBpediaTechTut
The Databus IDs
Resource URI Scheme:
https://databus.dbpedia.org/PUBLISHER/GROUP/ARTIFACT/VERSION/FILE
Example:
https://databus.dbpedia.org/jj-author/mastr/bnetza-mastr/01.04.01/bnetza-mastr_rli_type=hydro.nt.gz
�
76
https://tinyurl.com/DBpediaTechTut
SPARQL Access
https://databus.dbpedia.org/repo/sparql
OR
https://databus.dbpedia.org/yasgui
NOT THE SAME AS https://dbpedia.org/sparql !!!
77
https://tinyurl.com/DBpediaTechTut
Databus - Robot Operations
Load - fully automated in a subscription model
Derive - create a new artifact by conversion, filtering, extraction, textmining, enrichment, statistics, generating a machine learning model, fix errors
Release (Package & Deploy) - packaging means making the data available on the network (e.g. via copying to /var/www Apache2), deploying means uploading the metadata to databus.dbpedia.org
�
78
https://tinyurl.com/DBpediaTechTut
API Access
TOKEN=$(curl -s -d 'client_id=upload-api' -d 'username=USERNAME -d 'password=PASSWORD -d 'grant_type=password' https://databus.dbpedia.org/auth/realms/databus/protocol/openid-connect/token | cut -d'"' -f 4)
curl -v -X PUT https://databus.dbpedia.org/USERNAME/GROUP/ARTIFACT/VERSION -H "Authorization: Bearer $TOKEN" -d 'DATAID_AS_JSON_LD'
79
https://tinyurl.com/DBpediaTechTut
Registering Data via Web GUI
80
Databus Web “Upload”
https://databus.dbpedia.org/system/upload
Required for Databus GUI Upload:
81
https://tinyurl.com/DBpediaTechTut
Registering Data with Maven
82
Registering Data with Maven
83
https://tinyurl.com/DBpediaTechTut
Linked WebId and Databus Accounts
WebId and PKCS12 Certificate Tutorial: https://github.com/dbpedia/webid
Databus Account: Register on https://databus.dbpedia.org/
Linking of both accounts: Add your WebId URI to your Databus Account
84
https://tinyurl.com/DBpediaTechTut
Databus Upload with Maven
The cities example project hierarchy (mvn structure)
85
https://tinyurl.com/DBpediaTechTut
Group POM
86
https://tinyurl.com/DBpediaTechTut
Maven Commands
Upload plugin http://dev.dbpedia.org/Databus_Upload_User_Manual with:
87
https://tinyurl.com/DBpediaTechTut
Databus Collections
88
Databus Collections
89
https://tinyurl.com/DBpediaTechTut
Self-deployable Services
using Docker-Compose
90
Dockerized Databus Applications
Apps are run using docker-compose. Containers usually communicate via volumes.
Download
Container
Application Container
Helper Containers
(e.g. Database)
uses
waits for download
Creates download.lck in target volume
does things once the download is complete
https://tinyurl.com/DBpediaTechTut
(Generic) DBpedia Lookup
https://github.com/dbpedia/dbpedia-lookup
Composite of:
RDF data is loaded into a graph database to enable SPARQL access�Key-Value pairs are selected via SPARQL queries
92
https://tinyurl.com/DBpediaTechTut
DBpedia Spotlight
https://hub.docker.com/repository/docker/dbpedia/dbpedia-spotlight
https://demo.dbpedia-spotlight.org/
93
https://tinyurl.com/DBpediaTechTut
Virtuoso Triple Store
Demo: https://github.com/dbpedia/virtuoso-sparql-endpoint-quickstart
Bash:
git clone https://github.com/dbpedia/virtuoso-sparql-endpoint-quickstart.git�cd virtuoso-sparql-endpoint-quickstart�COLLECTION_URI=https://databus.dbpedia.org/jan/collections/kgc-demo VIRTUOSO_ADMIN_PASSWD=password docker-compose up
Query:
select * where {� ?s ?p ?o .� ?s a <http://xmlns.com/foaf/0.1/Person>�}
94
https://tinyurl.com/DBpediaTechTut
DBpedia Release Process on the DBpedia Databus
95
by Marvin Hofer
The New DBpedia Release Cycle
96
https://tinyurl.com/DBpediaTechTut
The DBpedia Release Cycle
97
START: 10th of month
https://tinyurl.com/DBpediaTechTut
The DBpedia Release Cycle
98
Release raw data
https://tinyurl.com/DBpediaTechTut
The DBpedia Release Cycle
99
Data cleaning
https://tinyurl.com/DBpediaTechTut
The DBpedia Release Cycle
100
Release final data
https://tinyurl.com/DBpediaTechTut
The DBpedia Release Cycle
101
Quality Control
https://tinyurl.com/DBpediaTechTut
Traceability and Issue Management
102
DataID
Code
File
https://tinyurl.com/DBpediaTechTut
Test driven knowledge extraction
Test Process
103
https://tinyurl.com/DBpediaTechTut
DBpedia DIEF - Issue Tracker
104
Issue Tracker
105
Please post support questions @forum.dbpedia.org
https://tinyurl.com/DBpediaTechTut
Issue Tracker
106
Please post support questions @forum.dbpedia.org
Decide: If testable by the minidump, � it is data, otherwise software
https://tinyurl.com/DBpediaTechTut
Steps for Data and Software Issues
107
Create Issue
Write Test
Write Fix
Close Issue
https://tinyurl.com/DBpediaTechTut
Databus Mods
Metadata Enrichment for Databus Files
108
Databus Mods Overview
109
The DBpedia Databus
Some file server
Databus Mods�master-worker�microservices
Mod Metadata
Federated Queries�- find metadata of Databus files�- find data using metadata
metadata access
data flow
More information at https://github.com/dbpedia/databus-mods
https://tinyurl.com/DBpediaTechTut
Databus Mods Metadata
110
https://tinyurl.com/DBpediaTechTut
Databus Mods Architecture
111
Mod Master
Mod Worker (Requirements)
https://tinyurl.com/DBpediaTechTut
VoID Mod Example
112
Find RDF datasets containing specific classes or properties
https://tinyurl.com/DBpediaTechTut
DBpedia ID Management,
PreFusion, and Cartridge Creation
113
by Johannes Frey
DBpedia Global Identity Management
114
Global Identity Management
Interoperability Challenges of Linked Data:
lead to problems with “qualified references” (I3) and when combining RDF data
→ DBpedia Global IDs (entities) + DBpedia Global Properties for equiv. clusters
https://global.dbpedia.org/id/<base58-ID>
https://global.dbpedia.org/property/<base58-ID>
115
https://tinyurl.com/DBpediaTechTut
Global Identity Management Cycle
116
https://tinyurl.com/DBpediaTechTut
Global Identity Management Cycle
5. release a new cluster snapshot dump and update microservices which
117
global: "https://global.dbpedia.org/id/2gtFW",
locals:
[
],
cluster:
[
]
https://tinyurl.com/DBpediaTechTut
DBpedia Cartridge Creation
118
Cartridge Creation
1. ID Rewriting
Input from DBpedia Databus:
119
http://fr.dbpedia.org/resource/Paris
4
prop-fr:étages
http://fr.dbpedia.org/resource/Tour_Eiffel
prop-fr:propriétaire
4 [fr]
dbo:floorCount
dbo:city
https://tinyurl.com/DBpediaTechTut
Cartridge Combination / PreFusion
2. PreFuse
120
4 [fr]
dbo:floorCount
dbo:city
4 [fr] , 3 [en]
dbo:floorCount
dbo:city
C1
C2
PreFusion
https://tinyurl.com/DBpediaTechTut
Cartridge / Prefusion Serialization
121
4 [fr] , 3 [es,en]
dbo:floorCount
https://global.dbpedia.org/id/12HpzV
https://tinyurl.com/DBpediaTechTut
Novel Modular PreFusion
⇒ useful metadata is a “must” to handle and select these files
122
https://tinyurl.com/DBpediaTechTut
FlexiFusion with Cartridges
123
https://tinyurl.com/DBpediaTechTut
Value sync classification (absolute scale)
124
Blue: value(s) from Source d are synced / not “challenged”
Green: information only in Source d (erroneous / novel??)
Red: all values from Source d are not synced (unique)
Yellow: partially synced but also unique value(s) in Source d � or d is incomplete
# sp
pairs
sources
https://tinyurl.com/DBpediaTechTut
Evolution: 2019.11 vs 2019.12
125
sources
Blue 0/0
Green 1/0
Red 1/1
Yellow 0/1
Added wikidata -> geonames links
https://tinyurl.com/DBpediaTechTut
Value Sync Classification (normalized scale)
126
https://tinyurl.com/DBpediaTechTut
Mapping Management: Ontology Challenges
⇒ DBpedia Archivo (Ontology Archive)
127
https://tinyurl.com/DBpediaTechTut
Prefusion Sync Comparison 2019.12 vs 2020.01
128
source | SSC no & ACC no | SSC yes & ACC no | SSC no & ACC yes | Covered source | SSC yes & ACC yes | sum sp |
Dnb old | 0 | 101.992.101 | 0 | - | 1.356.166 | 103.348.267 |
dnb | 656.525 | 97.246.794 | 434.717 | 189.061 | 2.688.940 | 101.026.976 |
Musicbrainz old | 0 | 91.852.034 | 0 | - | 0 | 91.852.034 |
musicbrainz | 59 | 91.748.451 | 22.523 | 22.283 | 72.783 | 91.843.816 |
Geonames old | 0 | 160.625.184 | 362 | - | 9.745.222 | 170.370.768 |
geonames | 0 | 160.445.798 | 384 | 326 | 9.840.852 | 170.287.034 |
High values implicate potential incompleteness in | nothing | L,M, compl. source | N ?? | | N, source errors, property mismatch | |
But working | all | - | L,M?? | | L, | |
Fixed identity management for DNB https IRIs
Musicbrainz identifier dataset IRI fix
Future Vision: incremental Fusion: quantitative Feedback to Linking / Mapping / Normalisation
Blue 0/0
Green 1/0
Red 1/1
Yellow 0/1
https://tinyurl.com/DBpediaTechTut
DBpedia Archivo
129
an Augmented Ontology Archive
by Denis Streitmatter
Problems of Ontologies
Access
Quality
130
ID
Accept: application/RDF+XML etc.
e.g. Semantic Web applications
Accept: text/html
e.g. Web browsers
Resource Identifier (NIR)
e.g. http://dbpedia.org/ontology/
https://tinyurl.com/DBpediaTechTut
Archivo Workflow
131
Automatic Ontology Discovery
Ontology Augmentation
Persistence
on the Databus
Ontology
Update
weekly crawl of:
https://tinyurl.com/DBpediaTechTut
Archivo as a Ontology Backup/Citing Tool
One REST request:
132
http://archivo.dbpedia.org/download?
o={ontology-URI}
f={format}
v={version}
e.g. http://archivo.dbpedia.org/download?o=http://datashapes.org/dash&v=2020.07.16-115638&f=ttl
https://tinyurl.com/DBpediaTechTut
Ontology Augmentation & Evaluation
Evaluation:
Augmentation:
133
https://tinyurl.com/DBpediaTechTut
Archivo Stars
Baseline:
Fitness for use stars:
134
0x⭐ Ontology
2x⭐ Ontology
4x⭐ Ontology
https://tinyurl.com/DBpediaTechTut
Persistence on the Databus
135
https://tinyurl.com/DBpediaTechTut
Access (Live)
136
git clone https://github.com/dbpedia/virtuoso-sparql-endpoint-quickstart.git
cd virtuoso-sparql-endpoint-quickstart
COLLECTION_URI=https://databus.dbpedia.org/denis/collections/latest_ontologies_as_nt_sample VIRTUOSO_ADMIN_PASSWD=secret docker-compose up
https://tinyurl.com/DBpediaTechTut
Contributions to DBpedia
137
by Milan Dojchinovski
Type of contributions
138
https://tinyurl.com/DBpediaTechTut
Google Summer of Code Projects
This year we will participate in the GSoC project for the 10th time!
Recent GSoC project:
Check more details here: https://www.dbpedia.org/community/gsoc/
139
https://tinyurl.com/DBpediaTechTut
Wrap-up / Q&A
140
by Milan Dojchinovski + all others
What have you learned
141
https://tinyurl.com/DBpediaTechTut
Useful pointers
142
https://tinyurl.com/DBpediaTechTut
Join DBpedia
143
https://tinyurl.com/DBpediaTechTut
Thank you! / Q&A
… final thoughts or questions?
144
https://tinyurl.com/DBpediaTechTut
References
145
https://tinyurl.com/DBpediaTechTut
DBpedia vs. Wikidata
Complementary but still different projects
146
https://tinyurl.com/DBpediaTechTut
Dockerized Databus Applications
147
Dockerized Databus Applications
Apps are run using docker-compose. Containers usually communicate via volumes.
148
Download
Container
Application Container
Helper Containers
(e.g. Database)
uses
waits for download
Creates download.lck in target volume
does things once the download is complete
https://tinyurl.com/DBpediaTechTut
(Dockerized) SPARQL endpoints
Visit https://github.com/dbpedia/virtuoso-sparql-endpoint-quickstart
Composite of:
149
https://tinyurl.com/DBpediaTechTut
DBpedia Lookup
Visit https://github.com/dbpedia/dbpedia-lookup
Composite of:
Example: https://lookup.dbpedia.org
150
https://tinyurl.com/DBpediaTechTut
Contribute to Archivo
151
https://tinyurl.com/DBpediaTechTut
DBpedia: Towards FAIR Linked Data
Improvements of Linked Data FAIRness
Databus + Databus Mods
→ F,A,R for data and metadata
Archivo
→ F,A,I,R for ontologies → I for (meta)data
Identity Management
→ I for data and vocabulary properties
152
https://tinyurl.com/DBpediaTechTut
Complex Agents and data workflows on the Databus
153
DBpedia Spotlight
154
https://hub.docker.com/repository/docker/dbpedia/spotlight-multilingual-databus
https://www.dbpedia-spotlight.org/demo/
https://tinyurl.com/DBpediaTechTut
DBpedia Spotlight
155
https://tinyurl.com/DBpediaTechTut
DBpedia Spotlight
156
https://tinyurl.com/DBpediaTechTut
Summary
157
https://tinyurl.com/DBpediaTechTut
How to use the DBpedia data
Common use cases:
Possible solution: The docker containers of the DBpedia Technology Stack
158
https://tinyurl.com/DBpediaTechTut
Available Docker Containers
159
TODO Update this…. Option F: Access through self-deployed Apps and Services
https://tinyurl.com/DBpediaTechTut
Data Downloader for Docker Compose
https://hub.docker.com/repository/docker/dbpedia/dbpedia-databus-collection-downloader
Requires:
160
INSERT NICE IMAGE HERE
Container creates a .lock file in the target volume on startup and removes it after the download.
Other containers start to process the data when the .lock file no longer exists.
PRO: No need to code the data access yourself
CON(?): You need to use docker-compose
https://tinyurl.com/DBpediaTechTut
Virtuoso SPARQL Endpoint Quickstart
https://hub.docker.com/r/dbpedia/virtuoso-sparql-endpoint-quickstart
Requires:
161
INSERT NICE IMAGE HERE
Uses the Download-Container and a Tenforce Virtuoso image.
Installer (virtuoso-sparql-endpoint-quickstart) loads the data into the triple store and installs the DBpedia plugin.
Installer and Download-Container terminate and shut down.
https://tinyurl.com/DBpediaTechTut
Data Access on the DBpedia Databus
Demo: Pulling the data with a collection
162
https://tinyurl.com/DBpediaTechTut
Databus - Digital Factory Platform
Build automation tool based on Maven
https://github.com/dbpedia/databus-maven-plugin
163
Time versioned: 2018.04.10
https://tinyurl.com/DBpediaTechTut
Preliminaries
Manual: User Manual v1.3 · dbpedia/databus-maven-plugin Wiki · GitHub
Tutorial Resources: https://github.com/dbpedia/stack-tutorial-resources
Required for Databus MVN Upload: http://dev.dbpedia.org/Databus_Upload_User_Manual#prerequisites
164
https://tinyurl.com/DBpediaTechTut
Example cities project
165
Publisher (demo)
Group A (stack-tutorial)
Artifact A (cities)
Version
File F1
.ttl
https://tinyurl.com/DBpediaTechTut
Group POM
166
https://tinyurl.com/DBpediaTechTut
Databus Upload
The data project hierarchy:
167
https://tinyurl.com/DBpediaTechTut
Artifact POM
168
https://tinyurl.com/DBpediaTechTut
Databus Upload
The data project hierarchy:
169
https://tinyurl.com/DBpediaTechTut
Artifact Documentation (Markdown)
170
https://tinyurl.com/DBpediaTechTut
Databus Upload
file name prefix needs to match artifact name
folder name needs to be named after the version
171
https://tinyurl.com/DBpediaTechTut
Databus Upload
run mvn deploy
example project https://github.com/JJ-Author/stack-tutorial-resources/tree/master/databus-upload
pw: demopwd
172
https://tinyurl.com/DBpediaTechTut
Databus Collections
173
Databus Collections
Example collection Open Energy Ontology + MaStR RDF Daten
https://databus.dbpedia.org/jfrey/collections/core-market-data/
Let’s visit: https://databus.dbpedia.org/system/collection-editor
174
https://tinyurl.com/DBpediaTechTut
Databus Access via Website and SPARQL
For website access visit:�https://databus.dbpedia.org/jan/stack-tutorial/cities
For SPARQL access visit:�https://databus.dbpedia.org/yasgui/
175
https://tinyurl.com/DBpediaTechTut
Databus Mods & Overlay system
176
Databus Mods
177
https://tinyurl.com/DBpediaTechTut
VoID Mod
Example query search for files using the Open energy ontology classes
178
https://tinyurl.com/DBpediaTechTut
Databus Mod Platform
Mod Server (Master)
179
https://tinyurl.com/DBpediaTechTut
Mod Worker
Requirements
Benefits
180
https://tinyurl.com/DBpediaTechTut
Overlay systems
complex systems that generate consistent metadata overlays can be built on top of Databus + Databus Mods and realize custom services (e.g. an energy asset search).
181
https://tinyurl.com/DBpediaTechTut
Downloading from the Databus
182
Download Options
183
https://tinyurl.com/DBpediaTechTut
Download in R
library(SPARQL) # SPARQL querying package
# Step 1 - Set up preliminaries and define query
# Define the databus endpoint
endpoint <- "https://databus.dbpedia.org/repo/sparql"
# create query statement
q<-"PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dataid: <http://dataid.dbpedia.org/ns/core#>
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT DISTINCT ?file WHERE {
?dataset dataid:artifact <https://databus.dbpedia.org/jj-author/mastr/bnetza-mastr> ;
dct:hasVersion '01.04.00'^^xsd:string ;
dcat:distribution ?distribution .
?distribution dataid:formatExtension 'csv'^^xsd:string .
?distribution dcat:downloadURL ?file .
}"
# Step 2 - Use SPARQL package to submit query and save results to a data frame
qd <- SPARQL(endpoint,q)
df <- qd$results
184
https://tinyurl.com/DBpediaTechTut
Raw Databus and wget Download
old-fashioned FTP-like view of the files registered on Databus
https://raw.databus.dbpedia.org/
Download (old) snapshots of Open energy ontology
wget --no-parent --mirror https://raw.databus.dbpedia.org/denis/oe-ontology
185
https://tinyurl.com/DBpediaTechTut
Download with Bash
see dynamic instructions on Databus Collections Website
https://databus.dbpedia.org/jfrey/collections/core-market-data/
186
https://tinyurl.com/DBpediaTechTut
Databus Mod Platform
Mod Server (Master)
187
https://tinyurl.com/DBpediaTechTut
Mod Worker
Requirements
Benefits
188
https://tinyurl.com/DBpediaTechTut
Overlay systems
complex systems that generate consistent metadata overlays can be built on top of Databus + Databus Mods and realize custom services (e.g. an energy asset search).
189
https://tinyurl.com/DBpediaTechTut
Download Options
190
https://tinyurl.com/DBpediaTechTut
Automatic Ontology Discovery
191
Ontology Repositories
User Suggestions
IRIs of archived Ontologies
VOID summaries from the Databus
Classes/Properties
Ontology IRIs
Ontology Validation
https://tinyurl.com/DBpediaTechTut
Augmentation
192
Problem | Archivo Solution |
Format Heterogeneity | Deploy as parsed turtle, rdfxml and ntriples |
Logical Consistency | Pellet¹ consistency test |
Metadata/Human Readability | LODE² documentation, SHACL test |
No/unclear License | SHACL tests |
(Publishing) Guideline Heterogeneity | Archivo Stars |
No/unclear Versioning | timestamps; axiom-based semantic versions |
https://tinyurl.com/DBpediaTechTut
Feature Plugins
193
https://tinyurl.com/DBpediaTechTut
Feature Badges / SHACL Library
194
¹https://www.w3.org/TR/shacl/ SHACL → Define the shape of RDF with RDF
Ontology Snapshot on the Databus
Feature Plugin
enhances
checks compliance of ontology with
gets deployed with
gets deployed with
Feature Badge
tested with SHACL
https://tinyurl.com/DBpediaTechTut
Ont. (Re)search and Analysis using Databus Stack
Creating a fresh, local index of the latest ontologies is very easy and automizable
2 easy options:
bin/DatabusClient -f nt -s query.sparql (or collection URI)
Shell Guru Tip:
query=$(curl -H "Accept:text/sparql" https://databus.dbpedia.org/jfrey/collections/archivo-latest-ontology-snapshots)
files=$(curl -H "Accept: text/csv" --data-urlencode "query=${query}" https://databus.dbpedia.org/repo/sparql | tail -n+2 | sed 's/"//g')
while IFS= read -r file ; do wget $file; done <<< "$files"
195
1 https://databus.dbpedia.org/jfrey/collections/archivo-latest-ontology-snapshots
https://tinyurl.com/DBpediaTechTut
Flexible Ont. Access via SPARQL (Archivo Metadata)
196
https://tinyurl.com/DBpediaTechTut
Future Work
197
https://tinyurl.com/DBpediaTechTut