Semi-Automatic Example-Driven
Linked Data Mapping Creation
Pieter Heyvaert
pheyvaer.heyvaert@ugent.be
1
Semantic Web technologies rely on Linked Data,
but not all data is accessible as Linked Data.
databases
XML files
Solutions to provide access exist,
but results are not always as desired because limited knowledge is used:
data schema
ontology
2
Goal: improve access to data as Linked Data
3
Overview
problem
current solutions
approach
discussion
4
Overview
problem
current solutions
approach
discussion
5
Input data
id title author
0 Harry Potter and The Sorcerer’s Stone J.K. Rowling
1 Homo Deus Yuval Noah Harari
{
"authors": [{
"id": "jkr",
"name": "J.K. Rowling",
"country": "UK"
"birthdate": "1965-07-31"
},{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}]
}
6
Desired Linked Data
book:0 a schema:Book;
schema:title "Harry Potter and The Sorcerer’s Stone"@en;
schema:author author:jkr.
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
author:jkr a foaf:Person;
foaf:name "J.K. Rowling";
foaf:country "UK";
schema:birthdate "1965-07-21"^^xsd:date.
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "UK";
schema:birthdate "1976-04-24"^^xsd:date.
7
Apply rules to generate Linked Data
original
data
Linked
Data
rules
rules state how to generate RDF terms and triples using data and ontologies
8
Linked Data example available
9
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "Israel";
schema:birthdate "1976-04-24"^^xsd:date.
Use example to create rules
sample example
rules
10
original
data
Linked
Data
Linked Data example aligns
with sample of original data
id title author
1 Homo Deus Yuval Noah Harari
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
11
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "Israel";
schema:birthdate "1976-04-24"^^xsd:date.
Alignment with original data and create rules
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "Israel";
schema:birthdate "1976-04-24"^^xsd:date.
id title author
1 Homo Deus Yuval Noah Harari
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
id
12
rule: IRI is “book” + value from column “id”
Alignment with original data and create rules
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "Israel";
schema:birthdate "1976-04-24"^^xsd:date.
id title author
1 Homo Deus Yuval Noah Harari
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
title
13
rule: literal uses value from column “title”
Alignment with original data and create rules
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "Israel";
schema:birthdate "1976-04-24"^^xsd:date.
id title author
1 Homo Deus Yuval Noah Harari
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
titleproperty
14
rule: predicate is schema:title
Alignment with original data and create rules
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "Israel";
schema:birthdate "1976-04-24"^^xsd:date.
id title author
1 Homo Deus Yuval Noah Harari
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
type
15
rule: type of a book is schema:Book
Alignment with original data and create rules
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "Israel";
schema:birthdate "1976-04-24"^^xsd:date.
id title author
1 Homo Deus Yuval Noah Harari
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
other entity
16
rule: a book is related to its author
All rules
IRI is “book” + value from column “id”
Literal uses value from column “title”
Predicate is schema:title
Type of a book is schema:Book
A book is related to its author
17
Apply rules to generate all Linked Data
sample example
rules
18
original
data
Linked
Data
Linked Data might not be as desired
Rules are prone to errors when created manually
Wrong use of ontology classes, properties, and datatypes
Wrong alignments with original data
Especially when dealing
with large and complex data sources
multiple data sources at the same time
19
Overview
problem
current solutions
approach
discussion
20
Overview
problem
current solutions
approach
discussion
21
Solutions to reduce manual effort
when creating rules
Semi-automatic: users provide feedback
Automatic: no user interaction required
22
Current solutions use limited knowledge
Only work with
data schemas
data values
ontologies
Do not consider knowledge embedded in
query workload of Linked Data
Linked Data examples
23
Overview
problem
current solutions
approach
discussion
24
Overview
problem
current solutions
approach
discussion
25
We propose a semi-automatic
example-driven approach to create rules.
26
Overview
problem
current solutions
approach
data source alignment
rule creation
optional adjustments
Linked Data generation
discussion
27
book:1 a schema:Book;
schema:title "Homo Deus"@en;
schema:author author:ynh.
Visualize Linked Data example
author:ynh a foaf:Person;
foaf:name "Yuval Noah Harari";
foaf:country "Israel";
schema:birthdate "1976-04-24"^^xsd:date.
schema:Book foaf:Person
Homo Deus
@en
Yuval Noah Harari Israel 1976-04-24
xsd:date
book:1 author:ynh
schema:author
schema:title
foaf:name schema:birthdate
foaf:country
28
Overview
problem
current solutions
approach
data source alignment
rule creation
optional adjustments
Linked Data generation
discussion
29
Overview
problem
current solutions
approach
data source alignment
rule creation
optional adjustments
Linked Data generation
discussion
30
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
Align with data sources
schema:Book foaf:Person
Homo Deus
@en
Yuval Noah Harari Israel 1976-04-24
xsd:date
book:1 author:ynh
schema:author
schema:title
foaf:name schema:birthdate
foaf:country
id title author
1 Homo Deus Yuval Noah Harari
CSV
JSON
31
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
Align with data sources
schema:Book foaf:Person
Homo Deus
@en
Yuval Noah Harari Israel 1976-04-24
xsd:date
book:1 author:ynh
schema:author
schema:title
foaf:name schema:birthdate
foaf:country
id title author
1 Homo Deus Yuval Noah Harari
CSV
CSV
JSON
32
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
Align with data sources
schema:Book foaf:Person
Homo Deus
@en
Yuval Noah Harari Israel 1976-04-24
xsd:date
book:1 author:ynh
schema:author
schema:title
foaf:name schema:birthdate
foaf:country
id title author
1 Homo Deus Yuval Noah Harari
CSV
CSV
CSV
JSON
33
Align with data sources
schema:Book foaf:Person
Homo Deus
@en
Yuval Noah Harari Israel 1976-04-24
xsd:date
book:1 author:ynh
schema:author
schema:title
foaf:name schema:birthdate
foaf:country
JSONCSV
CSV CSV JSON JSON JSON
{
"id": "ynh",
"name": "Yuval Noah Harari",
"country": "Israel",
"birthdate": "1976-04-24"
}
id title author
1 Homo Deus Yuval Noah Harari
CSV
JSON
34
Select best data source
schema:Book foaf:Person
Homo Deus
@en
Yuval Noah Harari Israel 1976-04-24
xsd:date
book:1 author:ynh
schema:author
schema:title
foaf:name schema:birthdate
foaf:country
JSONCSV
CSV CSV JSON JSON JSON
for each subgraph with an entity
35
Select best data source
schema:Book foaf:Person
Homo Deus
@en
Yuval Noah Harari Israel 1976-04-24
xsd:date
book:1 author:ynh
schema:author
schema:title
foaf:name schema:birthdate
foaf:country
JSONCSV
CSV CSV JSON JSON JSON
only CSV data source
CSV
36
Select best data source
schema:Book foaf:Person
Homo Deus
@en
Yuval Noah Harari Israel 1976-04-24
xsd:date
book:1 author:ynh
schema:author
schema:title
foaf:name schema:birthdate
foaf:country
JSONCSV
CSV CSV JSON JSON JSON
CSV data source match with 1 node
JSON data source match with all nodes
JSON
37
Overview
problem
current solutions
approach
data source alignment
rule creation
optional adjustments
Linked Data generation
discussion
38
Rule creation
For every entity
For every attribute
For all interlinked entities
39
Create rules for entity
schema:Book
book:1
CSV
IRI is “book” + id
type is schema:Book
40
Create rules for attribute
schema:Book
book:1
CSVuse predicate schema:title
literal uses value from column title
language of the title is English
Homo Deus
@en
schema:title
CSV
41
Create rules for interlinked entities
schema:Book
book:1
CSV
use predicate schema:author
join condition: names match
foaf:Person
author:ynh
schema:author
JSON
42
Overview
problem
current solutions
approach
data source alignment
rule creation
optional adjustments
Linked Data generation
discussion
43
Optional adjustments
Fix errors if needed
Add additional rules to deal with exceptions
44
Overview
problem
current solutions
approach
data source alignment
rule creation
optional adjustments
Linked Data generation
discussion
45
Apply rules to generate all Linked Data
sample example
46
original
data
Linked
Data
rules
Overview
problem
current solutions
approach
data source alignment
rule creation
optional adjustments
Linked Data generation
discussion
47
Discussion
Advantages
Use knowledge embedded in Linked Data examples
Minimize errors and user interaction
Approach can be combined with other approaches
Disadvantages
Linked Data example is required
User action might still be required for special cases
48
Recap
Use cases can have Linked Data example available.
Example contains knowledge to create rules.
We introduced approach that uses this knowledge.
This approach can be combined with other approaches.
49

Semi-Automatic Example-Driven Linked Data Mapping Creation

  • 1.
    Semi-Automatic Example-Driven Linked DataMapping Creation Pieter Heyvaert pheyvaer.heyvaert@ugent.be 1
  • 2.
    Semantic Web technologiesrely on Linked Data, but not all data is accessible as Linked Data. databases XML files Solutions to provide access exist, but results are not always as desired because limited knowledge is used: data schema ontology 2
  • 3.
    Goal: improve accessto data as Linked Data 3
  • 4.
  • 5.
  • 6.
    Input data id titleauthor 0 Harry Potter and The Sorcerer’s Stone J.K. Rowling 1 Homo Deus Yuval Noah Harari { "authors": [{ "id": "jkr", "name": "J.K. Rowling", "country": "UK" "birthdate": "1965-07-31" },{ "id": "ynh", "name": "Yuval Noah Harari", "country": "Israel", "birthdate": "1976-04-24" }] } 6
  • 7.
    Desired Linked Data book:0a schema:Book; schema:title "Harry Potter and The Sorcerer’s Stone"@en; schema:author author:jkr. book:1 a schema:Book; schema:title "Homo Deus"@en; schema:author author:ynh. author:jkr a foaf:Person; foaf:name "J.K. Rowling"; foaf:country "UK"; schema:birthdate "1965-07-21"^^xsd:date. author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "UK"; schema:birthdate "1976-04-24"^^xsd:date. 7
  • 8.
    Apply rules togenerate Linked Data original data Linked Data rules rules state how to generate RDF terms and triples using data and ontologies 8
  • 9.
    Linked Data exampleavailable 9 book:1 a schema:Book; schema:title "Homo Deus"@en; schema:author author:ynh. author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "Israel"; schema:birthdate "1976-04-24"^^xsd:date.
  • 10.
    Use example tocreate rules sample example rules 10 original data Linked Data
  • 11.
    Linked Data examplealigns with sample of original data id title author 1 Homo Deus Yuval Noah Harari { "id": "ynh", "name": "Yuval Noah Harari", "country": "Israel", "birthdate": "1976-04-24" } 11 book:1 a schema:Book; schema:title "Homo Deus"@en; schema:author author:ynh. author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "Israel"; schema:birthdate "1976-04-24"^^xsd:date.
  • 12.
    Alignment with originaldata and create rules book:1 a schema:Book; schema:title "Homo Deus"@en; schema:author author:ynh. author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "Israel"; schema:birthdate "1976-04-24"^^xsd:date. id title author 1 Homo Deus Yuval Noah Harari { "id": "ynh", "name": "Yuval Noah Harari", "country": "Israel", "birthdate": "1976-04-24" } id 12 rule: IRI is “book” + value from column “id”
  • 13.
    Alignment with originaldata and create rules book:1 a schema:Book; schema:title "Homo Deus"@en; schema:author author:ynh. author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "Israel"; schema:birthdate "1976-04-24"^^xsd:date. id title author 1 Homo Deus Yuval Noah Harari { "id": "ynh", "name": "Yuval Noah Harari", "country": "Israel", "birthdate": "1976-04-24" } title 13 rule: literal uses value from column “title”
  • 14.
    Alignment with originaldata and create rules book:1 a schema:Book; schema:title "Homo Deus"@en; schema:author author:ynh. author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "Israel"; schema:birthdate "1976-04-24"^^xsd:date. id title author 1 Homo Deus Yuval Noah Harari { "id": "ynh", "name": "Yuval Noah Harari", "country": "Israel", "birthdate": "1976-04-24" } titleproperty 14 rule: predicate is schema:title
  • 15.
    Alignment with originaldata and create rules book:1 a schema:Book; schema:title "Homo Deus"@en; schema:author author:ynh. author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "Israel"; schema:birthdate "1976-04-24"^^xsd:date. id title author 1 Homo Deus Yuval Noah Harari { "id": "ynh", "name": "Yuval Noah Harari", "country": "Israel", "birthdate": "1976-04-24" } type 15 rule: type of a book is schema:Book
  • 16.
    Alignment with originaldata and create rules book:1 a schema:Book; schema:title "Homo Deus"@en; schema:author author:ynh. author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "Israel"; schema:birthdate "1976-04-24"^^xsd:date. id title author 1 Homo Deus Yuval Noah Harari { "id": "ynh", "name": "Yuval Noah Harari", "country": "Israel", "birthdate": "1976-04-24" } other entity 16 rule: a book is related to its author
  • 17.
    All rules IRI is“book” + value from column “id” Literal uses value from column “title” Predicate is schema:title Type of a book is schema:Book A book is related to its author 17
  • 18.
    Apply rules togenerate all Linked Data sample example rules 18 original data Linked Data
  • 19.
    Linked Data mightnot be as desired Rules are prone to errors when created manually Wrong use of ontology classes, properties, and datatypes Wrong alignments with original data Especially when dealing with large and complex data sources multiple data sources at the same time 19
  • 20.
  • 21.
  • 22.
    Solutions to reducemanual effort when creating rules Semi-automatic: users provide feedback Automatic: no user interaction required 22
  • 23.
    Current solutions uselimited knowledge Only work with data schemas data values ontologies Do not consider knowledge embedded in query workload of Linked Data Linked Data examples 23
  • 24.
  • 25.
  • 26.
    We propose asemi-automatic example-driven approach to create rules. 26
  • 27.
    Overview problem current solutions approach data sourcealignment rule creation optional adjustments Linked Data generation discussion 27
  • 28.
    book:1 a schema:Book; schema:title"Homo Deus"@en; schema:author author:ynh. Visualize Linked Data example author:ynh a foaf:Person; foaf:name "Yuval Noah Harari"; foaf:country "Israel"; schema:birthdate "1976-04-24"^^xsd:date. schema:Book foaf:Person Homo Deus @en Yuval Noah Harari Israel 1976-04-24 xsd:date book:1 author:ynh schema:author schema:title foaf:name schema:birthdate foaf:country 28
  • 29.
    Overview problem current solutions approach data sourcealignment rule creation optional adjustments Linked Data generation discussion 29
  • 30.
    Overview problem current solutions approach data sourcealignment rule creation optional adjustments Linked Data generation discussion 30
  • 31.
    { "id": "ynh", "name": "YuvalNoah Harari", "country": "Israel", "birthdate": "1976-04-24" } Align with data sources schema:Book foaf:Person Homo Deus @en Yuval Noah Harari Israel 1976-04-24 xsd:date book:1 author:ynh schema:author schema:title foaf:name schema:birthdate foaf:country id title author 1 Homo Deus Yuval Noah Harari CSV JSON 31
  • 32.
    { "id": "ynh", "name": "YuvalNoah Harari", "country": "Israel", "birthdate": "1976-04-24" } Align with data sources schema:Book foaf:Person Homo Deus @en Yuval Noah Harari Israel 1976-04-24 xsd:date book:1 author:ynh schema:author schema:title foaf:name schema:birthdate foaf:country id title author 1 Homo Deus Yuval Noah Harari CSV CSV JSON 32
  • 33.
    { "id": "ynh", "name": "YuvalNoah Harari", "country": "Israel", "birthdate": "1976-04-24" } Align with data sources schema:Book foaf:Person Homo Deus @en Yuval Noah Harari Israel 1976-04-24 xsd:date book:1 author:ynh schema:author schema:title foaf:name schema:birthdate foaf:country id title author 1 Homo Deus Yuval Noah Harari CSV CSV CSV JSON 33
  • 34.
    Align with datasources schema:Book foaf:Person Homo Deus @en Yuval Noah Harari Israel 1976-04-24 xsd:date book:1 author:ynh schema:author schema:title foaf:name schema:birthdate foaf:country JSONCSV CSV CSV JSON JSON JSON { "id": "ynh", "name": "Yuval Noah Harari", "country": "Israel", "birthdate": "1976-04-24" } id title author 1 Homo Deus Yuval Noah Harari CSV JSON 34
  • 35.
    Select best datasource schema:Book foaf:Person Homo Deus @en Yuval Noah Harari Israel 1976-04-24 xsd:date book:1 author:ynh schema:author schema:title foaf:name schema:birthdate foaf:country JSONCSV CSV CSV JSON JSON JSON for each subgraph with an entity 35
  • 36.
    Select best datasource schema:Book foaf:Person Homo Deus @en Yuval Noah Harari Israel 1976-04-24 xsd:date book:1 author:ynh schema:author schema:title foaf:name schema:birthdate foaf:country JSONCSV CSV CSV JSON JSON JSON only CSV data source CSV 36
  • 37.
    Select best datasource schema:Book foaf:Person Homo Deus @en Yuval Noah Harari Israel 1976-04-24 xsd:date book:1 author:ynh schema:author schema:title foaf:name schema:birthdate foaf:country JSONCSV CSV CSV JSON JSON JSON CSV data source match with 1 node JSON data source match with all nodes JSON 37
  • 38.
    Overview problem current solutions approach data sourcealignment rule creation optional adjustments Linked Data generation discussion 38
  • 39.
    Rule creation For everyentity For every attribute For all interlinked entities 39
  • 40.
    Create rules forentity schema:Book book:1 CSV IRI is “book” + id type is schema:Book 40
  • 41.
    Create rules forattribute schema:Book book:1 CSVuse predicate schema:title literal uses value from column title language of the title is English Homo Deus @en schema:title CSV 41
  • 42.
    Create rules forinterlinked entities schema:Book book:1 CSV use predicate schema:author join condition: names match foaf:Person author:ynh schema:author JSON 42
  • 43.
    Overview problem current solutions approach data sourcealignment rule creation optional adjustments Linked Data generation discussion 43
  • 44.
    Optional adjustments Fix errorsif needed Add additional rules to deal with exceptions 44
  • 45.
    Overview problem current solutions approach data sourcealignment rule creation optional adjustments Linked Data generation discussion 45
  • 46.
    Apply rules togenerate all Linked Data sample example 46 original data Linked Data rules
  • 47.
    Overview problem current solutions approach data sourcealignment rule creation optional adjustments Linked Data generation discussion 47
  • 48.
    Discussion Advantages Use knowledge embeddedin Linked Data examples Minimize errors and user interaction Approach can be combined with other approaches Disadvantages Linked Data example is required User action might still be required for special cases 48
  • 49.
    Recap Use cases canhave Linked Data example available. Example contains knowledge to create rules. We introduced approach that uses this knowledge. This approach can be combined with other approaches. 49