Successfully reported this slideshow.

Semantic Modelling using Semantic Web Technology


Published on

Presentation for the tutorial on Semantic Modelling using Semantic Web Technology for the XML Holland community.

Published in: Technology, Education
  • Be the first to comment

Semantic Modelling using Semantic Web Technology

  1. 1. Semantic Modelling WorkshopSemantic Web Technology<br /><br />Semantic Web Rubik's Cube by dullhunk at flickr under a cc-license. Thanks!<br />
  2. 2.
  3. 3. Overview<br />Semantic Web: background<br />Ideology<br />Semantic Web and Linked Data<br />Knowledge Representation and Ontology<br />Quick overview<br />RDF and RDFS<br />OWL 2 DL<br />SKOS<br />SPARQL<br />Resources<br />Wrap Up<br />Tutorial information<br />
  4. 4. Background Information<br />The Web as a Knowledge Base<br />
  5. 5. The Semantic Web Ideology<br />Identity is everything<br />Partial solutions are great too!<br />Layer cake/Web Stack<br />2/22/10<br />5<br />OWL<br />
  6. 6. Key Aspects<br />World Wide Web Consortium<br />Globally unique identifiers<br />URI and IRI<br />Straightforward data integration<br />Interdependent languages<br />Resource Description Framework (RDF)<br />RDF Schema (RDFS)<br />Web Ontology Language (OWL), and OWL 2<br />SPARQL Query Language for RDF (SPARQL)<br />Semantic Web Rule Language (SWRL)<br />Rule Interchange Format (RIF)<br />Simple Knowledge Organization System (SKOS)<br />
  7. 7. Semantic Web or Linked Data?<br /><ul><li>Initially
  8. 8. `Metadata’ for web pages
  9. 9. Since ~2006
  10. 10. `Web of Data’
  11. 11. Semantic web as data source in its own right
  12. 12. Linked Data
  13. 13. A ‘Databaseesque’ Web
  14. 14. RDF Triple stores
  15. 15. Common schema and identification mechanism
  16. 16. A single query language</li></ul>2/22/10<br />7<br />
  17. 17. Linked Open Data<br />2/22/10<br />8<br />
  18. 18. 2/22/10<br />9<br />November 2009: 13.1 Billion triples, 142 Million links <br />
  19. 19. But… not just Web<br />History<br />Semantic Networks and Frame Systems (‘70-ies)<br />Formal Knowledge Representation (KL-One)<br />Description Logics (DL)<br />Model Theoretic Semantics<br />Logic programming<br />Strongly based in methodology<br />Knowledge sharing and reuse<br />Ontologies<br />Formal semantics<br />
  20. 20. Why Ontology?<br />Knowledge bases that mix procedural and declarative knowledge are extremely hard to reuse<br />Ontologies capture the `domain theory’ of a KBS: that what a KBS knows about<br />Procedures capture what a KBS does with that knowledge<br />Problem Solving Methods<br />Slight problem:<br />Rules look like procedures, but can also capture declarative knowledge<br />
  21. 21. Why Formal Semantics?<br />Standard inferences, dependable reasoning<br />Reusable KBS components should guarantee:<br />Soundnessall answers given should be correct<br />Completenessthe system should give all answers<br />Timelinessthe system should answer within reasonable time<br />Consistencythe knowledge in a KB should be provably correct<br />
  22. 22. WARNING<br />Reasoners on the Semantic Web adopt the Open World Assumption as opposed to the Closed World Assumption of many other languages<br />This means that:<br />If a reasoner cannot infer that a conclusion holds, it stays silent, and will not report that it does not hold.<br />This is contrary to the negation as failure (NAF) feature of many rule languages.<br />Why?<br />NAF hinders reusability on the Web because conclusions may change depending on new information.<br />
  23. 23. Ingredients<br />Ontology (TBox)<br />Classesconcepts in the domain (≈ DB tables)<br />Propertiesrelations that hold between individuals, or between an individual and a literal value (≈ DB columns)<br />Axioms (only in OWL)restrictions on relations that may hold between instances of a certain class.<br />Assertions (ABox)<br />Individualsinstances of classes in the ontology (≈ DB records)<br />Property assertionsrelations that hold between instances (≈ DB record entries)<br />Rules<br />
  24. 24. Architecture<br />
  25. 25. Very Quick Overview<br />Examples<br />
  26. 26. Multiple Syntaxes<br />RDF<br />RDF/XMLVerbose, does not make an exact ‘fit’ with RDF data model<br />TurtleHuman readable<br />RDFaEmbedded in XHTML as attributes<br />TriXSupports ‘named graphs’<br />OWL<br />All RDF syntaxes, though RDF/XML is normative<br />OWL XMLXSLT-able<br />Functional SyntaxMapping to Structural Specification (UML MOF)<br />Manchester SyntaxHuman readable, used by most editors (Protégé, TopBraid)<br />
  27. 27. 2/22/10<br />18<br />URI’sand Namespaces<br />URI: Universal Resource Identifier<br />... Just an identifier<br /><br />URL: Universal Resource Location<br /><br />URN: Universal Resource Name<br />urn:leibnizcenter:people:joost<br />Namespace<br />A ‘space’ in which all locally defined names are unique, e.g.:<br /><br /><br />Basis for `trust’<br />
  28. 28. RDF Schema<br />RDF is triple-based<subject,predicate,object><br />Resources<br />rdf:Resource<br />rdfs:Class<br />rdf:Property<br />rdfs:Literal<br />Properties<br />rdf:type<br />rdfs:subClassOf<br />rdfs:subPropertyOf<br />rdfs:domain<br />rdfs:range<br />rdfs:comment<br />rdfs:label<br /><ul><li>RDFS Reasoning
  29. 29. Traverse subclass hierarchy
  30. 30. Infer class membership based on domain and range</li></li></ul><li>RDFS Example<br />@prefix rdf:<>.<br />@prefix rdfs:<>.<br />@prefixr:<>.<br />@prefixk:<>.<br />@prefix :<>.<br />r:Premieraowl:Class;<br />rdfs:subClassOfr:Minister.<br />r:is_premier_vanaowl:ObjectProperty;<br />rdfs:domainr:Premier;<br />rdfs:ranger:Regering.<br />:balkenendear:Premier;<br />r:name ”Jan Peter Balkenende”^^xsd:string;<br />r:is_premier_van k:balkenende_4 ;<br />r:is_premier_van k:balkenende_3 ;<br />r:is_premier_van k:balkenende_2 ;<br />r:is_premier_van k:balkenende_1 ;<br />k:balkenende_4 ar:Regering.<br />2/22/10<br />20<br />
  31. 31.
  32. 32. OWL 2 DL Reasoning<br />Consistency and coherency checking<br />Are all axioms and assertions consistent?<br />Classification<br />Determine subclass relations between classes<br />Infer disjointness and equivalence of classes<br />Realization<br />Determine class membership for individuals<br />Infer new property relations with other individuals<br />
  33. 33. OWL 2 DL (1)<br />owl:Thing and owl:Nothing<br />Class axioms<br />Intersection, union, disjointness, equivalence:Minister disjointWith:Kamerlid<br />someValuesFrom (existential):Omnivore subClassOf:Animal and (:eats some :Vegetable)<br />allValuesFrom (universal):Herbivore subClassOf:Animal and (:eats only :Vegetable)<br />hasValue:CowsCalledBettyequivalentTo:Cow and (:name has “Betty”)<br />Self:Narcissist equivalentTo:likes Self<br />
  34. 34. OWL 2 DL (2)<br />Class axioms (cont’d)<br />(Qualified) Cardinality:Premier equivalentTo:is_premier_vanmin 1 :Kabinet:KabinetsubClassOf:heeft_premiermax 1 :Premier<br />Property axioms<br />Transitive, chains<br />Inverse<br />Functional, inverse functional<br />Reflexive, irreflexive<br />Symmetric, asymmetric<br />Disjoint, equivalent<br />Property types<br />Object Property vs. Datatype Property<br />
  35. 35. OWL 2 Profiles<br />Subsets of OWL 2 syntax that have desirable computational properties<br />OWL 2 QL<br />Optimized for ontologies with many instances<br />Query answering<br />OWL 2 EL<br />Optimized for ontologies with many classes<br />OWL 2 RL<br />Implementable using rule-based technology<br />
  36. 36. Vocabularies<br />RDFS and OWL 2 DL semantics often too much<br />Simple method for describing taxonomies<br />Simple Knowledge Organization System<br />Lifting existing KOS’s to the Semantic Web<br />Every skos:Concept is an OWL individual<br />Lightweight semantic relations: broader, narrower, and related.<br />Lightweight mapping relations between skos:ConceptSchemes.<br />JURIX 2009<br />
  37. 37. Querying: SPARQL<br />RDF Repositories exposed via SPARQL Endpoints<br />Query types<br />SELECT … WHERE …<br />CONSTRUCT … WHERE … ( similar to rules!)<br />DELETE … WHERE …<br />Example<br />PREFIXr: <><br />PREFIXk: <><br />SELECT ?name<br />WHERE<br /> { ?xr:is_premier_van k:balkenende_4.<br /> ?xr:name?name }<br />?xbinds with <> <br />?name binds with“Jan Peter Balkenende”^^xsd:string<br />2/22/10<br />27<br />
  38. 38. Resources: Documentation<br />W3C Semantic Web portal<br />Start with<br />RDF Primer<br />OWL2 Document Overview & Primer<br />SPARQL<br />SKOS Primer<br />Rule Interchange Format<br />
  39. 39. Resources: Tools<br />Editors<br />TopBraid Composer (RDF+OWL)<br />Protégé 4 (OWL Only)<br />Reasoners<br />Pellet, Fact++, OWLIM, Racer, HermiT, CEL<br />RDF Repositories<br />OpenRDF Sesame, 4Store/5Store, Virtuoso, Mulgara<br />RDB to RDF bridges<br />D2RQ <br />
  40. 40. Wrap Up: Benefits<br />Single `database schema’ eases query writing<br />Global identifiers facilitate data integration<br />Layered approach eases extensibility<br />Formal semantics ensure dependability<br />
  41. 41. Wrap Up: Tutorial Information<br />2 Hour session<br />TopBraid Composer Standard (trial license)<br />What we’ll do:<br />Understanding an ontology & using a reasoner<br />Data integration using SPARQL<br />Simple OWL class definitions<br />Advanced OWL class definitions (extra)<br />