towards the definition of a language independent mapping
play

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,


  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 ocorcho@fi.upm.es 19/11/2019 @ocorcho SciKnow 2019

  2. Creating Knowledge Graphs? Source Data Knowledge Graph Emily Jonah Scarrat Lomu 08/02/90 18/11/75 People ex:name ID Name Birthdate SportID ex:birthdate ex:birthdate 1 Emily 19900208 2 Scarrat <Person/2> <Person/1> 2 Jonah 19751118 2 Lomu ex:sport Sports ID Sport ex:name <Sport/2> Rugby 1 Ice Skating 2 Rugby ex:name <Sport/1> Ice Skating 2

  3. Creating Knowledge Graphs? Source Data Knowledge Graph Emily Jonah Scarrat Lomu 08/02/90 18/11/75 People ex:name ID Name Birthdate SportID ex:birthdate ex:birthdate 1 Emily 19900208 2 Scarrat <Person/2> <Person/1> 2 Jonah 19751118 2 Lomu ex:sport Sports ID Sport ex:name <Sport/2> Rugby 1 Ice Skating 2 Rugby - Ad-hoc tools ex:name <Sport/1> Ice Skating - Declarative mappings 3

  4. Declarative Mappings • Establish relationships between ontology and data • Several languages : Scientific SPARQL Knowledge R2RML Generate xR2RML RML CSVW Easy way to create and choose among them? 4

  5. Knowledge Graph Creation SPARQL Ontologies Data source Knowledge graph Mapping Mapping File Engine RDB Extract Transform Load 5

  6. Mapping structure (RML) <PERSON> Triples Map rml:logicalSource [ rml:source "/home/user/data/people.csv" ; rml:referenceFormulation ql:CSV ; ]; rr:subjectMap [ people.csv rr:class ex:Person; rr:template "http://ex.com/Person/{ID}"; ID Name Birthdate SportID ]; rr:predicateObjectMap [ 1 Emily 19900208 2 rr:predicateMap [ rr:constant ex:name ]; Scarrat rr:objectMap [ rml:reference "Name" ]; ]; 2 Jonah 19751118 2 rr:predicateObjectMap [ Lomu rr:predicateMap [ rr:constant ex:birthdate ]; rr:objectMap [ rml:reference "Birthdate" ]; ]; 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” . 6

  7. Mapping structure (RML) people.csv sports.csv ID Name Birthdate SportID ID Sport <PERSON> rml:logicalSource [ 1 Emily 19900208 2 1 Ice Skating rml:source "/home/user/data/people.csv" ; Scarrat rml:referenceFormulation ql:CSV ; 2 Jonah 19751118 2 2 Rugby ]; Lomu rr:subjectMap [ rr:class ex:Person; rr:template "http://ex.com/Person/{ID}"; ]; < SPORT > rr:predicateObjectMap [ rml:logicalSource [ rr:predicateMap [ rr:constant ex:name ]; rml:source "/home/user/data/sports.csv" ; rr:objectMap [ rml:reference "Name" ]; rml:referenceFormulation ql:CSV ; ]; ]; rr:predicateObjectMap [ rr:subjectMap [ rr:predicateMap [ rr:constant ex:birthdate ]; rr:class ex:Sport; rr:objectMap [ rml:reference "Birthdate" ]; rr:template "http://ex.com/Sport/{sport}"; ]; ]; rr:predicateObjectMap [ rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:sport ]; rr:predicateMap [ rr:constant ex:name ]; rr:objectMap [ rr:parentTriplesMap < SPORT >; rr:objectMap [ rml:reference "sport" ]; rr:joinCondition [ rr:child "sport_id"; rr:parent "id"; ]; ]; ]; ]; Join condition 7

  8. Mapping structure (RML) people.csv sports.csv ID Name Birthdate SportID ID Sport <PERSON> rml:logicalSource [ 1 Emily 19900208 2 1 Ice Skating ex:Person/1 a ex:Person . rml:source "/home/user/data/people.csv" ; Scarrat rml:referenceFormulation ql:CSV ; ex:Person/1 ex:name “Emily Scarrat” . 2 Jonah 19751118 2 2 Rugby ]; Lomu ex:Person/1 ex:birthdate “08/02/1990” . rr:subjectMap [ rr:class ex:Person; ex:Person/1 ex:sport ex:Sport/2 . rr:template "http://ex.com/Person/{ID}"; ex:Person/2 a ex:Person . ]; < SPORT > rr:predicateObjectMap [ ex:Person/2 ex:name “Jonah Lomu” . rml:logicalSource [ rr:predicateMap [ rr:constant ex:name ]; rml:source "/home/user/data/sports.csv" ; ex:Person/2 ex:birthdate “18/11/1975” . rr:objectMap [ rml:reference "Name" ]; rml:referenceFormulation ql:CSV ; ]; ex:Person/2 ex:sport ex:Sport/2 . ]; rr:predicateObjectMap [ rr:subjectMap [ rr:predicateMap [ rr:constant ex:birthdate ]; rr:class ex:Sport; rr:objectMap [ rml:reference "Birthdate" ]; rr:template "http://ex.com/Sport/{sport}"; ex:Sport/1 a ex:Sport . ]; ]; rr:predicateObjectMap [ ex:Sport/1 ex:name “Ice Skating” . rr:predicateObjectMap [ rr:predicateMap [ rr:constant ex:sport ]; rr:predicateMap [ rr:constant ex:name ]; ex:Sport/2 a ex:Sport . rr:objectMap [ rr:parentTriplesMap < SPORT >; rr:objectMap [ rml:reference "sport" ]; rr:joinCondition [ rr:child "sport_id"; rr:parent "id"; ]; ex:Sport/2 ex:name “Rugby” . ]; ]; ]; 8

  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

  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

  11. Spreadsheet design Prefix sheet Source sheet Prefix URI ID Feature Value ex http://ex.com/ PERSON source data/people.csv sql http://w3.org/ns/sql# PERSON format CSV SPORT source data/sports.csv Subject sheet SPORT format CSV ID Class URI PERSON ex:Person http://ex.com/Person/{ID} SPORT ex:Sport http://ex.com/Sport/{ID} 11

  12. Spreadsheet design Predicate-Object sheet Predicate ReferenceID InnerRef OurterRef ID Object DataType PERSON ex:name {name} string PERSON ex:birthdate {birthdate} date SPORT {SportID} {ID} PERSON ex:sport SPORT ex:name {sport} string SPORT ex:code {ID} integer SPORT ex:comment <Fun1> FunctionID Function Params Function sheet sql:concat {ID}, <Fun2> <Fun1> <Fun2> sql:upper {sport} 12

  13. Mapeathor • Once the mapping rules are declared, they are translated into the most suitable language Data source Spreadsheet ... mappings Mapeathor Ontology Under development https://github.com/oeg-upm/Mapeathor 13

  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

  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 ocorcho@fi.upm.es 19/11/2019 @ocorcho SciKnow 2019

Recommend


More recommend