1Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France F. Michel Université Côte d’Azur, CNRS, Inria, I3S, France Knowledge Engineering: Semantic web, web of data, linked data ANF APSEM2018 : Apprentissage et sémantique Toulouse, 12-15 Nov. 2018
2Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France More data sources  More opportunities
3Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France To you, your data may mean this…
4Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France To others, your data may mean that…
5Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Interoperability Challenges Structural heterogeneity Uniform representation format Semantic heterogeneity Controlled vocabularies, thesaurus, ontologies… Common way to query the data
6Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France The Semantic Web Linked Data and the Web of Data Publishing legacy data in RDF Agenda
7Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France The Semantic Web
8Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France “The Semantic Web provides an environment where applications can publish and link data, define vocabularies, query data at web scale, and draw inferences.” (adapted from W3C website) Link Querying Vocabularies Inference Publish
9Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Standards of the Semantic Web Applications and Services Trust Identifiers: URI, IRI Data representation: RDF abstract model + syntaxes Vocabularies: RDFS, OWL, SKOSQuerying: SPARQL Rules: SPIN, SWRL, SHACL Unifying logic: First Order Logic Proof Security(crypto)
10Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Standards of the Semantic Web Applications and Services Trust Identifiers: URI, IRI Data representation: RDF abstract model + syntaxes Vocabularies: RDFS, OWL, SKOSQuerying: SPARQL Rules: SPIN, SWRL, SHACL Unifying logic: First Order Logic Proof Security(crypto) Web of Data
11Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Standards of the Semantic Web Applications and Services Trust Identifiers: URI, IRI Data representation: RDF abstract model + syntaxes Vocabularies: RDFS, OWL, SKOSQuerying: SPARQL Rules: SPIN, SWRL, SHACL Unifying logic: First Order Logic Proof Security(crypto) Reasonning
12Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France RDF is a conceptual model based on triples, i.e. any fact consists of 3 components: ( subject, predicate, object ) Source: C. Faron Zucker, O. Corby. Introduction au web de données et au web sémantique. Séminaire INRA Open Data Dec. 2014. The Resource Description Framework
13Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France websem.html is a texte websem.html has as author Fabien websem.html has as author Olivier websem.html has as author Catherine websem.html has as subject Semantic Web websem.html was written in 2011 The Resource Description Framework
14Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France websem.html SemanticWeb Texte Catherine Olivier Fabien type date author subject author author 2011 The Resource Description Framework
15Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France http://ns.inria.fr/ ex/websem.html http://en.wikipedia.org/ wiki/Semantic_Web dt:Text http://ns.inria.fr/ catherine.faron http://ns.inria.fr/ olivier.corby http://ns.inria.fr/ fabien.gandon rdf:type dc:date dc:author dc:subject dc:author dc:author 2011 The Resource Description Framework
16Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France N-Triples <http://inria.fr/ex/websem.html> <http://purl.org/dc/elements/1.1/author> <http://ns.inria.fr/catherine.faron> . <http://inria.fr/ex/websem.html> <http://purl.org/dc/elements/1.1/theme> "Semantic Web" . @prefix dc: <http://purl.org/dc/elements/1.1/> . <http://inria.fr/ex/websem.html> dc:author <http://ns.inria.fr/catherine.faron> ; dc:theme "Semantic Web" . Turtle RDF Syntaxes: N-Triples, Turtle, JSON-LD, Trig, RDF/XML…
17Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France RDF Schemas define classes of resources, their properties, and organize their hierarchies
18Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France igeo:TerritoireAdministratif igeo:Commune rdfs:subClassOf rdfs:Class rdf:type rdf:type http://id.insee.fr/geo/ commune/34172 rdf:type @prefix igeo: <http://rdf.insee.fr/def/geo#> . RDF Schema - Classes
19Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France igeo:codeINSEE igeo:codeCommune rdfs:subPropertyOf rdf:Property rdf:type rdf:type @prefix igeo: <http://rdf.insee.fr/def/geo#> . RDF Schema - Properties
20Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France igeo:Commune rdfs:range igeo:chefLieu igeo:PaysOuTerritoire rdfs:domain http://id.insee.fr/geo/ departement/34 igeo:chefLieu rdf:typerdf:type @prefix igeo: <http://rdf.insee.fr/def/geo#> . http://id.insee.fr/geo/ commune/34172 Montpellier RDF Schema - Properties
21Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France OWL The Web Ontology Language
22Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France def. by enumeration def. by intersection def. by union def. by complement  class disjunction def. by restriction def. by cardinality def. by equivalence ! 1..1  [>=18] def. by value restrict. … OWL in one slide… (a)symetric prop. prop. disjunction cardinality1..1 ! indiv. prop. negation chained prop.   (irr)reflexive prop. transitive prop. inverse prop.
23Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Closed vs. Open Worlds Assumptions Closed World Everything there is to know about a thing is stated in a single, closed DB.  Not asserted facts are false, i.e. only asserted facts are true.  A schema may define what can be stated (a schema may be violated). Open World Knowledge is distributed. Each RDF graph may state facts about a thing, irrespective of what others state.  Because a fact is not asserted does not mean it is false.  Every asserted fact is true (no schema)  But some facts may lead to inconsistencies
24Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Quering RDF with SPARQL SPARQL Protocol and RDF Query Language
25Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL 1.1 Rec. 21 Mar. 2013  Query Language (using the Turtle syntax) • CRUD operations  Query results • Query Results Format XML, JSON, CSV/TCV  Protocols • SPARQL Protocol • SPARQL Graph Store HTTP Protocol  Entailment Regimes
26Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL: triple patterns Turtle syntax with “?” or “$” to mark variables: ?x rdf:type ex:Person Describe patterns of triples that we look for: SELECT ?subject ?type WHERE { ?subject rdf:type ?type } Default pattern: conjunction of triple patterns: SELECT ?x WHERE { ?x rdf:type ex:Person . ?x ex:name ?name . } ?x rdf:type ex:Person ?name ex:name
27Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL: namespace prefixes Declare prefixes of used vocabularies: PREFIX mit: <http://www.mit.edu#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?student WHERE { ?student mit:registeredAt ?x . ?x foaf:homepage <http://www.mit.edu> . } Declare a base namespace for relative URIs: BASE <http://example.org/people#> SELECT ?student WHERE { ?student foaf:knows <Ted> . } ?student mit:registeredAt ?x http://www.mit.edu foaf:homepage http://example.org/ people#Ted foaf:knows
28Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL: language and typed literals PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?x ?f WHERE { ?x foaf:name "Steve"@en ; foaf:knows ?f . } PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?x WHERE { ?x foaf:name "Steve"@en ; foaf:age "21"^^xsd:integer . }
29Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL: optional pattern PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?person ?name WHERE { ?person foaf:homepage <http://fabien.info> . OPTIONAL { ?person foaf:name ?name . } }  Variable ?name is potentially unbound.
30Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL alternative pattern Merge the results of two graph patterns: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?person ?name WHERE { ?person foaf:name ?name . { ?person foaf:homepage <http://fabien.info> . } UNION { ?person foaf:homepage <http://fabien.org> . } }
31Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL filters PREFIX ex: <http://inria.fr/schema#> SELECT ?person ?name WHERE { ?person rdf:type ex:Person; ex:name ?name; ex:age ?age . FILTER (xsd:integer(?age) >= 18) } Other examples: FILTER(?name IN ("fabien", "olivier", "catherine")) FILTER(langMatches(lang(?name),"en"))
32Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL additional features  Solution modifiers: ORDER BY, LIMIT, OFFSET, DISTINCT  Aggregates GROUP BY, HAVING  Negation NOT EXISTS, MINUS, NOT IN WHERE { ?x a ex:Person MINUS { ?x foaf:knows ex:John } }  Nested queries  Named graphs  Property paths ?x foaf:knows+ ?friend .  …
33Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL JSON results { "head": { "vars": [ "student" ] }, "results": { "bindings: [ {"student": { "type": "uri", "value": "http//www.mit.edu/data.rdf#joe" } }, { "student": { "type": "uri", "value": "http//www.mit.edu/abcdef" } } ] } }
34Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France PREFIX igeo:<http://rdf.insee.fr/def/geo#> SELECT ?x WHERE { ?x rdf:type igeo:TerritoireAdministratif } igeo:TerritoireAdministratif igeo:Commune rdfs:subClassOf ex:Montpellier rdf:type SPARQL Entailments: infer knowledge
35Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France PREFIX igeo:<http://rdf.insee.fr/def/geo#> SELECT ?x ?code WHERE { ?x igeo:codeINSEE ?code} igeo:codeINSEE igeo:codeCommune rdfs:subPropertyOf SPARQL Entailments: infer knowledge
36Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France SELECT ?x WHERE { ?x rdf:type igeo:Commune } SELECT ?x WHERE { ?x rdf:type igeo:PaysOuTerritoire } SPARQL Entailments: infer knowledge igeo:Commune rdfs:range igeo:chefLieu igeo:PaysOuTerritoire rdfs:domain http://id.insee.fr/geo/ departement/34 igeo:chefLieu http://id.insee.fr/geo/ commune/34172 rdf:typerdf:type
37Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France The Semantic Web Linked Data and the Web of Data Publishing legacy data in RDF Agenda
38Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France The Web of Data aka. Data Web, Web 3.0, Global Knowledge Graph…
39Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France The Web of Data Applications and Services Trust Identifiers: URI, IRI Data representation: RDF abstract model + syntaxes Vocabularies: RDFS, OWL, SKOSQuerying: SPARQL Rules: SPIN, SWRL, SHACL Unifying logic: First Order Logic Proof Security(crypto) First step in the deployment of the Semantic Web Detractors would say the part of the Semantic Web that works…
40Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France “The Semantic Web provides an environment where applications can publish and link data, define vocabularies, query data at web scale, and draw inferences.” Link Querying Vocabularies Inference Publish
41Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Linked Data principles 1.Use URIs to name things 2.Use HTTP URIs so that people can look up those names 3.When someone looks up a URI, provide useful information using the standards (RDF, SPARQL) 4.Include links to other URIs, so they can discover more things
42Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Linked Open Data Cloud: 1200+ linked datasets Linking Open Data cloud diagram, 2018. J.P. McCrae, A. Abele, P. Buitelaar, A. Jentzsch, V. Andryushechkin and R. Cyganiak. http://lod-cloud.net/  On the web, under open licenses  Machine-readable (RDF)  URIs to name things  Common vocabularies  Linked with each other  Queryable Iconic but partial view of the Web of Data LOD Atlas: 25,000+ datasets
43Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France The Semantic Web Linked Data and the Web of Data Publishing legacy data in RDF Agenda
44Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Legacy dataset
45Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Legacy dataset describe
46Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
47Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
48Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
49Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
50Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
51Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
52Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Ensure shared understanding? Need for common vocabularies with well defined semantics • Controlled vocabulary, thesaurus, ontology • How to define/model a vocabulary? • Where to find existing vocabularies, how to reuse and/or them?
53Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
54Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Many methods for many types of data sources AstroGrid-D, SPARQL2XQuery, XSPARQL XML XLWrap, Linked CSV, CSVW, RML CSV/TSV/Spreadsheets D2RQ, R2O, Ultrawrap, Triplify, SM R2RML: Morph-RDB, ontop, Virtuoso Relational Databases RML, TARQL, Apache Any23, DataLift, SPARQL-Generate Multiple formats RDFa, Microformats HTML TARQL, JSON-LD, RML JSON xR2RML (MongoDB), ontop (MongoDB), [Mugnier et al, 2016] (key-value stores) NoSQL M.L. Mugnier, M.C. Rousset, and F. Ulliana. “Ontology-Mediated Queries for NOSQL Databases.” In Proc. AAAI. 2016. SPARQL Micro-services, Linked REST APIs Web APIs
55Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
56Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France  Metadata vocabularies Schema.org, DCAT, VOID, HCLS  Data portals and catalogues CKAN, data.gov.*, Google Dataset Search Vocabularies to describe datasets and dataset catalogues
57Franck MICHEL - Université Côte d’Azur, CNRS, Inria, I3S, France Thank you!

Knowledge Engineering: Semantic web, web of data, linked data

  • 1.
    1Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France F. Michel Université Côte d’Azur, CNRS, Inria, I3S, France Knowledge Engineering: Semantic web, web of data, linked data ANF APSEM2018 : Apprentissage et sémantique Toulouse, 12-15 Nov. 2018
  • 2.
    2Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France More data sources  More opportunities
  • 3.
    3Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France To you, your data may mean this…
  • 4.
    4Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France To others, your data may mean that…
  • 5.
    5Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Interoperability Challenges Structural heterogeneity Uniform representation format Semantic heterogeneity Controlled vocabularies, thesaurus, ontologies… Common way to query the data
  • 6.
    6Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France The Semantic Web Linked Data and the Web of Data Publishing legacy data in RDF Agenda
  • 7.
    7Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France The Semantic Web
  • 8.
    8Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France “The Semantic Web provides an environment where applications can publish and link data, define vocabularies, query data at web scale, and draw inferences.” (adapted from W3C website) Link Querying Vocabularies Inference Publish
  • 9.
    9Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Standards of the Semantic Web Applications and Services Trust Identifiers: URI, IRI Data representation: RDF abstract model + syntaxes Vocabularies: RDFS, OWL, SKOSQuerying: SPARQL Rules: SPIN, SWRL, SHACL Unifying logic: First Order Logic Proof Security(crypto)
  • 10.
    10Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Standards of the Semantic Web Applications and Services Trust Identifiers: URI, IRI Data representation: RDF abstract model + syntaxes Vocabularies: RDFS, OWL, SKOSQuerying: SPARQL Rules: SPIN, SWRL, SHACL Unifying logic: First Order Logic Proof Security(crypto) Web of Data
  • 11.
    11Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Standards of the Semantic Web Applications and Services Trust Identifiers: URI, IRI Data representation: RDF abstract model + syntaxes Vocabularies: RDFS, OWL, SKOSQuerying: SPARQL Rules: SPIN, SWRL, SHACL Unifying logic: First Order Logic Proof Security(crypto) Reasonning
  • 12.
    12Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France RDF is a conceptual model based on triples, i.e. any fact consists of 3 components: ( subject, predicate, object ) Source: C. Faron Zucker, O. Corby. Introduction au web de données et au web sémantique. Séminaire INRA Open Data Dec. 2014. The Resource Description Framework
  • 13.
    13Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France websem.html is a texte websem.html has as author Fabien websem.html has as author Olivier websem.html has as author Catherine websem.html has as subject Semantic Web websem.html was written in 2011 The Resource Description Framework
  • 14.
    14Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France websem.html SemanticWeb Texte Catherine Olivier Fabien type date author subject author author 2011 The Resource Description Framework
  • 15.
    15Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France http://ns.inria.fr/ ex/websem.html http://en.wikipedia.org/ wiki/Semantic_Web dt:Text http://ns.inria.fr/ catherine.faron http://ns.inria.fr/ olivier.corby http://ns.inria.fr/ fabien.gandon rdf:type dc:date dc:author dc:subject dc:author dc:author 2011 The Resource Description Framework
  • 16.
    16Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France N-Triples <http://inria.fr/ex/websem.html> <http://purl.org/dc/elements/1.1/author> <http://ns.inria.fr/catherine.faron> . <http://inria.fr/ex/websem.html> <http://purl.org/dc/elements/1.1/theme> "Semantic Web" . @prefix dc: <http://purl.org/dc/elements/1.1/> . <http://inria.fr/ex/websem.html> dc:author <http://ns.inria.fr/catherine.faron> ; dc:theme "Semantic Web" . Turtle RDF Syntaxes: N-Triples, Turtle, JSON-LD, Trig, RDF/XML…
  • 17.
    17Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France RDF Schemas define classes of resources, their properties, and organize their hierarchies
  • 18.
    18Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France igeo:TerritoireAdministratif igeo:Commune rdfs:subClassOf rdfs:Class rdf:type rdf:type http://id.insee.fr/geo/ commune/34172 rdf:type @prefix igeo: <http://rdf.insee.fr/def/geo#> . RDF Schema - Classes
  • 19.
    19Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France igeo:codeINSEE igeo:codeCommune rdfs:subPropertyOf rdf:Property rdf:type rdf:type @prefix igeo: <http://rdf.insee.fr/def/geo#> . RDF Schema - Properties
  • 20.
    20Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France igeo:Commune rdfs:range igeo:chefLieu igeo:PaysOuTerritoire rdfs:domain http://id.insee.fr/geo/ departement/34 igeo:chefLieu rdf:typerdf:type @prefix igeo: <http://rdf.insee.fr/def/geo#> . http://id.insee.fr/geo/ commune/34172 Montpellier RDF Schema - Properties
  • 21.
    21Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France OWL The Web Ontology Language
  • 22.
    22Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France def. by enumeration def. by intersection def. by union def. by complement  class disjunction def. by restriction def. by cardinality def. by equivalence ! 1..1  [>=18] def. by value restrict. … OWL in one slide… (a)symetric prop. prop. disjunction cardinality1..1 ! indiv. prop. negation chained prop.   (irr)reflexive prop. transitive prop. inverse prop.
  • 23.
    23Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Closed vs. Open Worlds Assumptions Closed World Everything there is to know about a thing is stated in a single, closed DB.  Not asserted facts are false, i.e. only asserted facts are true.  A schema may define what can be stated (a schema may be violated). Open World Knowledge is distributed. Each RDF graph may state facts about a thing, irrespective of what others state.  Because a fact is not asserted does not mean it is false.  Every asserted fact is true (no schema)  But some facts may lead to inconsistencies
  • 24.
    24Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Quering RDF with SPARQL SPARQL Protocol and RDF Query Language
  • 25.
    25Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL 1.1 Rec. 21 Mar. 2013  Query Language (using the Turtle syntax) • CRUD operations  Query results • Query Results Format XML, JSON, CSV/TCV  Protocols • SPARQL Protocol • SPARQL Graph Store HTTP Protocol  Entailment Regimes
  • 26.
    26Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL: triple patterns Turtle syntax with “?” or “$” to mark variables: ?x rdf:type ex:Person Describe patterns of triples that we look for: SELECT ?subject ?type WHERE { ?subject rdf:type ?type } Default pattern: conjunction of triple patterns: SELECT ?x WHERE { ?x rdf:type ex:Person . ?x ex:name ?name . } ?x rdf:type ex:Person ?name ex:name
  • 27.
    27Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL: namespace prefixes Declare prefixes of used vocabularies: PREFIX mit: <http://www.mit.edu#> PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?student WHERE { ?student mit:registeredAt ?x . ?x foaf:homepage <http://www.mit.edu> . } Declare a base namespace for relative URIs: BASE <http://example.org/people#> SELECT ?student WHERE { ?student foaf:knows <Ted> . } ?student mit:registeredAt ?x http://www.mit.edu foaf:homepage http://example.org/ people#Ted foaf:knows
  • 28.
    28Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL: language and typed literals PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?x ?f WHERE { ?x foaf:name "Steve"@en ; foaf:knows ?f . } PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?x WHERE { ?x foaf:name "Steve"@en ; foaf:age "21"^^xsd:integer . }
  • 29.
    29Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL: optional pattern PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?person ?name WHERE { ?person foaf:homepage <http://fabien.info> . OPTIONAL { ?person foaf:name ?name . } }  Variable ?name is potentially unbound.
  • 30.
    30Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL alternative pattern Merge the results of two graph patterns: PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT ?person ?name WHERE { ?person foaf:name ?name . { ?person foaf:homepage <http://fabien.info> . } UNION { ?person foaf:homepage <http://fabien.org> . } }
  • 31.
    31Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL filters PREFIX ex: <http://inria.fr/schema#> SELECT ?person ?name WHERE { ?person rdf:type ex:Person; ex:name ?name; ex:age ?age . FILTER (xsd:integer(?age) >= 18) } Other examples: FILTER(?name IN ("fabien", "olivier", "catherine")) FILTER(langMatches(lang(?name),"en"))
  • 32.
    32Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL additional features  Solution modifiers: ORDER BY, LIMIT, OFFSET, DISTINCT  Aggregates GROUP BY, HAVING  Negation NOT EXISTS, MINUS, NOT IN WHERE { ?x a ex:Person MINUS { ?x foaf:knows ex:John } }  Nested queries  Named graphs  Property paths ?x foaf:knows+ ?friend .  …
  • 33.
    33Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SPARQL JSON results { "head": { "vars": [ "student" ] }, "results": { "bindings: [ {"student": { "type": "uri", "value": "http//www.mit.edu/data.rdf#joe" } }, { "student": { "type": "uri", "value": "http//www.mit.edu/abcdef" } } ] } }
  • 34.
    34Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France PREFIX igeo:<http://rdf.insee.fr/def/geo#> SELECT ?x WHERE { ?x rdf:type igeo:TerritoireAdministratif } igeo:TerritoireAdministratif igeo:Commune rdfs:subClassOf ex:Montpellier rdf:type SPARQL Entailments: infer knowledge
  • 35.
    35Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France PREFIX igeo:<http://rdf.insee.fr/def/geo#> SELECT ?x ?code WHERE { ?x igeo:codeINSEE ?code} igeo:codeINSEE igeo:codeCommune rdfs:subPropertyOf SPARQL Entailments: infer knowledge
  • 36.
    36Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France SELECT ?x WHERE { ?x rdf:type igeo:Commune } SELECT ?x WHERE { ?x rdf:type igeo:PaysOuTerritoire } SPARQL Entailments: infer knowledge igeo:Commune rdfs:range igeo:chefLieu igeo:PaysOuTerritoire rdfs:domain http://id.insee.fr/geo/ departement/34 igeo:chefLieu http://id.insee.fr/geo/ commune/34172 rdf:typerdf:type
  • 37.
    37Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France The Semantic Web Linked Data and the Web of Data Publishing legacy data in RDF Agenda
  • 38.
    38Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France The Web of Data aka. Data Web, Web 3.0, Global Knowledge Graph…
  • 39.
    39Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France The Web of Data Applications and Services Trust Identifiers: URI, IRI Data representation: RDF abstract model + syntaxes Vocabularies: RDFS, OWL, SKOSQuerying: SPARQL Rules: SPIN, SWRL, SHACL Unifying logic: First Order Logic Proof Security(crypto) First step in the deployment of the Semantic Web Detractors would say the part of the Semantic Web that works…
  • 40.
    40Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France “The Semantic Web provides an environment where applications can publish and link data, define vocabularies, query data at web scale, and draw inferences.” Link Querying Vocabularies Inference Publish
  • 41.
    41Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Linked Data principles 1.Use URIs to name things 2.Use HTTP URIs so that people can look up those names 3.When someone looks up a URI, provide useful information using the standards (RDF, SPARQL) 4.Include links to other URIs, so they can discover more things
  • 42.
    42Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Linked Open Data Cloud: 1200+ linked datasets Linking Open Data cloud diagram, 2018. J.P. McCrae, A. Abele, P. Buitelaar, A. Jentzsch, V. Andryushechkin and R. Cyganiak. http://lod-cloud.net/  On the web, under open licenses  Machine-readable (RDF)  URIs to name things  Common vocabularies  Linked with each other  Queryable Iconic but partial view of the Web of Data LOD Atlas: 25,000+ datasets
  • 43.
    43Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France The Semantic Web Linked Data and the Web of Data Publishing legacy data in RDF Agenda
  • 44.
    44Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Legacy dataset
  • 45.
    45Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Legacy dataset describe
  • 46.
    46Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
  • 47.
    47Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
  • 48.
    48Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
  • 49.
    49Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
  • 50.
    50Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
  • 51.
    51Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
  • 52.
    52Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Ensure shared understanding? Need for common vocabularies with well defined semantics • Controlled vocabulary, thesaurus, ontology • How to define/model a vocabulary? • Where to find existing vocabularies, how to reuse and/or them?
  • 53.
    53Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
  • 54.
    54Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Many methods for many types of data sources AstroGrid-D, SPARQL2XQuery, XSPARQL XML XLWrap, Linked CSV, CSVW, RML CSV/TSV/Spreadsheets D2RQ, R2O, Ultrawrap, Triplify, SM R2RML: Morph-RDB, ontop, Virtuoso Relational Databases RML, TARQL, Apache Any23, DataLift, SPARQL-Generate Multiple formats RDFa, Microformats HTML TARQL, JSON-LD, RML JSON xR2RML (MongoDB), ontop (MongoDB), [Mugnier et al, 2016] (key-value stores) NoSQL M.L. Mugnier, M.C. Rousset, and F. Ulliana. “Ontology-Mediated Queries for NOSQL Databases.” In Proc. AAAI. 2016. SPARQL Micro-services, Linked REST APIs Web APIs
  • 55.
    55Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Publishing legacy data in RDF raises tricky questions Metadata Data Ensure shared understanding? Reference raw data (signals, binary…) Translate heterogeneous data into RDF? Legacy dataset describe Catalogue, data portal What metadata? Where/how to publish them?
  • 56.
    56Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France  Metadata vocabularies Schema.org, DCAT, VOID, HCLS  Data portals and catalogues CKAN, data.gov.*, Google Dataset Search Vocabularies to describe datasets and dataset catalogues
  • 57.
    57Franck MICHEL -Université Côte d’Azur, CNRS, Inria, I3S, France Thank you!