Towards the Definition of a Language-Independent Mapping Template - - PowerPoint PPT Presentation

towards the definition of a language independent mapping
SMART_READER_LITE
LIVE PREVIEW

Towards the Definition of a Language-Independent Mapping Template - - PowerPoint PPT Presentation

Towards the Definition of a Language-Independent Mapping Template for Knowledge Graph Creation Oscar Corcho, Ontology Engineering Group Universidad Politcnica de Madrid, Spain Ana Iglesias-Molina, David Chaves-Fraga and Freddy Priyatna,


slide-1
SLIDE 1

Towards the Definition of a Language-Independent Mapping Template for Knowledge Graph Creation

Oscar Corcho, Ontology Engineering Group Universidad Politécnica de Madrid, Spain

Ana Iglesias-Molina, David Chaves-Fraga and Freddy Priyatna, OEG - UPM

  • corcho@fi.upm.es

@ocorcho 19/11/2019 SciKnow 2019

slide-2
SLIDE 2

Creating Knowledge Graphs?

2

People ID Name Birthdate SportID 1 Emily Scarrat 19900208 2 2 Jonah Lomu 19751118 2 Sports ID Sport 1 Ice Skating 2 Rugby <Person/1> <Person/2> <Sport/2> <Sport/1>

Emily Scarrat Jonah Lomu 08/02/90 18/11/75 Ice Skating Rugby ex:birthdate ex:name ex:birthdate ex:sport ex:name ex:name

Knowledge Graph Source Data

slide-3
SLIDE 3

Creating Knowledge Graphs?

3

People ID Name Birthdate SportID 1 Emily Scarrat 19900208 2 2 Jonah Lomu 19751118 2 Sports ID Sport 1 Ice Skating 2 Rugby <Person/1> <Person/2> <Sport/2> <Sport/1>

Emily Scarrat Jonah Lomu 08/02/90 18/11/75 Ice Skating Rugby ex:birthdate ex:name ex:birthdate ex:sport ex:name ex:name

Knowledge Graph Source Data

  • Ad-hoc tools
  • Declarative

mappings

slide-4
SLIDE 4

Declarative Mappings

4

  • Establish relationships between ontology and data
  • Several languages:

R2RML RML xR2RML SPARQL Generate CSVW

Easy way to create and choose among them?

Scientific Knowledge

slide-5
SLIDE 5

Knowledge Graph Creation

5

Ontologies Mapping File

Extract Transform Load

Mapping Engine

SPARQL

RDB

Data source Knowledge graph

slide-6
SLIDE 6

Mapping structure (RML)

6 <PERSON> rml:logicalSource [ rml:source "/home/user/data/people.csv" ; rml:referenceFormulation ql:CSV ; ]; rr:subjectMap [ rr:class ex:Person; rr:template "http://ex.com/Person/{ID}"; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:name ]; rr:objectMap [ rml:reference "Name" ]; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:birthdate ]; rr:objectMap [ rml:reference "Birthdate" ]; ];

people.csv ID Name Birthdate SportID 1 Emily Scarrat 19900208 2 2 Jonah Lomu 19751118 2

ex:Person/1 a ex:Person . ex:Person/1 ex:name “Emily Scarrat” . ex:Person/1 ex:birthdate “08/02/1990” . ex:Person/2 a ex:Person . ex:Person/2 ex:name “Jonah Lomu” . ex:Person/2 ex:birthdate “18/11/1975” .

Triples Map

slide-7
SLIDE 7

Mapping structure (RML)

7 <PERSON> rml:logicalSource [ rml:source "/home/user/data/people.csv" ; rml:referenceFormulation ql:CSV ; ]; rr:subjectMap [ rr:class ex:Person; rr:template "http://ex.com/Person/{ID}"; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:name ]; rr:objectMap [ rml:reference "Name" ]; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:birthdate ]; rr:objectMap [ rml:reference "Birthdate" ]; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:sport ]; rr:objectMap [ rr:parentTriplesMap <SPORT>; rr:joinCondition [ rr:child "sport_id"; rr:parent "id"; ]; ]; ];

people.csv ID Name Birthdate SportID 1 Emily Scarrat 19900208 2 2 Jonah Lomu 19751118 2 sports.csv ID Sport 1 Ice Skating 2 Rugby

<SPORT> rml:logicalSource [ rml:source "/home/user/data/sports.csv" ; rml:referenceFormulation ql:CSV ; ]; rr:subjectMap [ rr:class ex:Sport; rr:template "http://ex.com/Sport/{sport}"; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:name ]; rr:objectMap [ rml:reference "sport" ]; ];

Join condition

slide-8
SLIDE 8

Mapping structure (RML)

8 <PERSON> rml:logicalSource [ rml:source "/home/user/data/people.csv" ; rml:referenceFormulation ql:CSV ; ]; rr:subjectMap [ rr:class ex:Person; rr:template "http://ex.com/Person/{ID}"; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:name ]; rr:objectMap [ rml:reference "Name" ]; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:birthdate ]; rr:objectMap [ rml:reference "Birthdate" ]; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:sport ]; rr:objectMap [ rr:parentTriplesMap <SPORT>; rr:joinCondition [ rr:child "sport_id"; rr:parent "id"; ]; ]; ];

people.csv ID Name Birthdate SportID 1 Emily Scarrat 19900208 2 2 Jonah Lomu 19751118 2 sports.csv ID Sport 1 Ice Skating 2 Rugby

<SPORT> rml:logicalSource [ rml:source "/home/user/data/sports.csv" ; rml:referenceFormulation ql:CSV ; ]; rr:subjectMap [ rr:class ex:Sport; rr:template "http://ex.com/Sport/{sport}"; ]; rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:name ]; rr:objectMap [ rml:reference "sport" ]; ];

ex:Person/1 a ex:Person . ex:Person/1 ex:name “Emily Scarrat” . ex:Person/1 ex:birthdate “08/02/1990” . ex:Person/1 ex:sport ex:Sport/2 . ex:Person/2 a ex:Person . ex:Person/2 ex:name “Jonah Lomu” . ex:Person/2 ex:birthdate “18/11/1975” . ex:Person/2 ex:sport ex:Sport/2 . ex:Sport/1 a ex:Sport . ex:Sport/1 ex:name “Ice Skating” . ex:Sport/2 a ex:Sport . ex:Sport/2 ex:name “Rugby” .

slide-9
SLIDE 9

Spreadsheets as mappings

  • Gathering and declaration of mapping rules in

spreadsheets

  • Each sheet contains an essential element describing the

data:

  • Prefixes
  • Source data
  • Subject
  • Predicate-Object
  • Functions

9

slide-10
SLIDE 10

Spreadsheets as mappings

  • Objective: language-independent, no need to know a

mapping language

  • Target user: Non mapping experts
  • Advantages: Improves rule visualization, enables using

functions of spreadsheets, guides the writing

10

slide-11
SLIDE 11

Spreadsheet design

11

Prefix URI ex http://ex.com/ sql http://w3.org/ns/sql#

Prefix sheet Source sheet Subject sheet

ID Class URI PERSON ex:Person http://ex.com/Person/{ID} SPORT ex:Sport http://ex.com/Sport/{ID} ID Feature Value PERSON source data/people.csv PERSON format CSV SPORT source data/sports.csv SPORT format CSV

slide-12
SLIDE 12

Spreadsheet design

12

Predicate-Object sheet

Predicate Object DataType ReferenceID InnerRef OurterRef ID ex:name {name} string PERSON ex:birthdate {birthdate} date PERSON ex:sport SPORT {SportID} {ID} PERSON ex:name {sport} string SPORT ex:code {ID} integer SPORT ex:comment <Fun1> SPORT

Function sheet

FunctionID Function Params <Fun1> sql:concat {ID},<Fun2> <Fun2> sql:upper {sport}

slide-13
SLIDE 13

Mapeathor

13

Data source Ontology Mapeathor

Spreadsheet mappings

Under development

...

https://github.com/oeg-upm/Mapeathor

  • Once the mapping rules are declared, they are

translated into the most suitable language

slide-14
SLIDE 14

Conclusions and Future Work

Conclusions:

  • Spreadsheet design to capture scientific knowledge from

experts improving KG creations

  • Mapeathor: from spreadsheets to any mapping language
  • Used in projects like H2020-Bimmer and Bio2RDF

Future work:

  • Improve spreadsheet design towards actual

language-independence

  • Develop Mapeathor with the spreadsheet
  • Widen the language translation

14

slide-15
SLIDE 15

Towards the Definition of a Language-Independent Mapping Template for Knowledge Graph Creation

Oscar Corcho, Ontology Engineering Group Universidad Politécnica de Madrid, Spain

Ana Iglesias-Molina, David Chaves-Fraga and Freddy Priyatna, OEG - UPM

  • corcho@fi.upm.es

@ocorcho 19/11/2019 SciKnow 2019