Understanding Web Ontology Language (OWL) in a Nutshell

Slide Note
Embed
Share

Web Ontology Language (OWL) is a powerful tool for ontology modeling, allowing the creation of complex structures and relationships. OWL encompasses entities, expressions, and properties, enabling detailed descriptions of domains through axioms. The language supports both object and data properties, connecting individuals and literals respectively. Class expressions in OWL enable the definition of intricate relationships between classes and individuals, providing a structured framework for knowledge representation.


Uploaded on Sep 25, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. OWL in brief Notes by Eleni Tsalapati

  2. Web Ontology Language (OWL) Results from Description Logics More expressive than RDFS allows more powerful ontology modelling OWL 2 ontologies consist of the following three different syntactic categories: Entities: classes, properties, and individuals Expressions: represent complex notions in the domain being described. Axioms are statements that are asserted to be true in the domain being described (e.g., a subclass axiom) 2

  3. OWL: Properties Properties: Object Properties: connect pairs of individuals ObjectPropertyAssertion(a:parentOf a:Peter a:Chris ) a:parentOf a:Peter a:Chris

  4. OWL: Properties Properties: Data Properties: connect individuals with literals. a:parentOf a:Peter a:Chris a:age 41 ^^xsd:integer

  5. OWL: Class Expressions CE:= ObjectIntersectionOf(CE1 CEn) ObjectUnionOf(CE1 CEn) ObjectComplementOf(CE) ObjectOneOf(a1 an) ObjectSomeValuesFrom(OPECE) (contains all those individuals that are connected by OPE to some some individual that is an instance of CE. ) DataSomeValuesFrom(DPE1 ... DPEn DR) CE3 CE1 CE2 yago:Trumpeter and and yago:JazzMusician *CEi=Class Expression, OPE=Object Property Expression, DPE=Data Property Expression, DR=Data Range

  6. OWL: Class Expressions CE:= ObjectIntersectionOf(CE1 CEn) ObjectUnionOf(CE1 CEn) ObjectComplementOf(CE) ObjectOneOf(a1 an) ObjectSomeValuesFrom(OPECE) (contains all those individuals that are connected by OPE to some some individual that is an instance of CE. ) DataSomeValuesFrom(DPE1 ... DPEn DR) CE3 CE1 CE2 yago:Trumpeter and yago:Singer) and (yago:JazzMusician and and *CEi=Class Expression, OPE=Object Property Expression, DPE=Data Property Expression, DR=Data Range

  7. OWL: Class Expressions CE:= ObjectIntersectionOf(CE1 CEn) ObjectUnionOf(CE1 CEn) ObjectComplementOf(CE) ObjectOneOf(a1 an) ObjectSomeValuesFrom(OPECE) (contains all those individuals that are connected by OPE to some some individual that is an instance of CE. ) DataSomeValuesFrom(DPE1 ... DPEn DR) CE3 CE1 CE2 yago:Trumpeter or or yago:JazzMusician *CEi=Class Expression, OPE=Object Property Expression, DPE=Data Property Expression, DR=Data Range

  8. OWL: Class Expressions CE:= ObjectIntersectionOf(CE1 CEn) ObjectUnionOf(CE1 CEn) ObjectComplementOf(CE) ObjectOneOf(a1 an) ObjectSomeValuesFrom(OPECE) (contains all those individuals that are connected by OPE to some some individual that is an instance of CE. ) DataSomeValuesFrom(DPE1 ... DPEn DR) CE3 CE1 CE2 yago:Trumpeter or or (yago:JazzMusician and and Singer) *CEi=Class Expression, OPE=Object Property Expression, DPE=Data Property Expression, DR=Data Range

  9. OWL: Class Expressions CE:= ObjectIntersectionOf(CE1 CEn) ObjectUnionOf(CE1 CEn) ObjectComplementOf(CE ObjectOneOf(a1 an) ObjectSomeValuesFrom(OPECE) (contains all those individuals that are connected by OPE to some some individual that is an instance of CE. ) DataSomeValuesFrom(DPE1 ... DPEn DR) CE3 CE1 CE2 CE) not not yago:Trumpeter *CEi=Class Expression, OPE=Object Property Expression, DPE=Data Property Expression, DR=Data Range

  10. OWL: Class Expressions CE:= ObjectIntersectionOf(CE1 CEn) ObjectUnionOf(CE1 CEn) ObjectComplementOf(CE ObjectOneOf(a1 an) ObjectSomeValuesFrom(OPECE) CE3 CE1 CE2 CE) not not (yago:Trumpeter or yago:JazzMusician) (contains all those individuals that are connected by OPE to some some individual that is an instance of CE. ) DataSomeValuesFrom(DPE1 ... DPEn DR) *CEi=Class Expression, OPE=Object Property Expression, DPE=Data Property Expression, DR=Data Range

  11. OWL: Class Expressions CE:= ObjectIntersectionOf(CE1 CEn) ObjectUnionOf(CE1 CEn) ObjectComplementOf(CE) ObjectOneOf(a1 an) ObjectSomeValuesFrom(OPECE) CE3 CE1 CE2 a2 a1 an a3 Weekdays: {Monday, Tuesday, Wednesday, Thursday, Friday} (contains all those individuals that are connected by OPE to some some individual that is an instance of CE. ) DataSomeValuesFrom(DPE1 ... DPEn DR) *CEi=Class Expression, OPE=Object Property Expression, DPE=Data Property Expression, DR=Data Range

  12. OWL: Class Expressions CE:= ObjectIntersectionOf(CE1 CEn) ObjectUnionOf(CE1 CEn) ObjectComplementOf(CE) ObjectOneOf(a1 an) ObjectSomeValuesFrom(OPECE) :Trumpeter :JazzConcert :RockConcert a2 a5 : :hasPlayedAt hasPlayedAt : :hasPlayedAt hasPlayedAt a4 a1 a1 : :hasPlayedAt hasPlayedAt a3 a3 (contains all those individuals that are connected by OPE to some some individual that is an instance of CE. ) :hasPlayedAt some some :JazzConcert DataSomeValuesFrom(DPE1 ... DPEn DR) *CEi=Class Expression, OPE=Object Property Expression, DPE=Data Property Expression, DR=Data Range

  13. OWL: Class Expressions CE:= ObjectAllValuesFrom(OPE CE) :Trumpeter :JazzConcert :RockConcert (contains all those individuals that if if they are connected by OPE to any individuals, then these individuals are instances of only only CE.) DataAllValuesFrom(DPE1 ... DPEn DR) ObjectMinCardinality(n OPE CE) DataMinCardinality(n DPE DR) ObjectMaxCardinality(2 a:hasPet) ObjectExactCardinality(1 a:hasPet a:Dog) a2 a5 : :hasPlayedAt hasPlayedAt : :hasPlayedAt hasPlayedAt a4 a1 a1 : :hasPlayedAt hasPlayedAt a3 a3 :hasPlayedAt only only :JazzConcert How can we discard a2, a5, a4?

  14. OWL: Class Expressions CE:= ObjectAllValuesFrom(OPE CE) :Trumpeter :JazzConcert :RockConcert (contains all those individuals that if if they are connected by OPE to any individuals, then these individuals are instances of only only CE.) DataAllValuesFrom(DPE1 ... DPEn DR) ObjectMinCardinality(n OPE CE) DataMinCardinality(n DPE DR) ObjectMaxCardinality(2 a:hasPet) ObjectExactCardinality(1 a:hasPet a:Dog) a2 a5 : :hasPlayedAt hasPlayedAt : :hasPlayedAt hasPlayedAt a4 a1 a1 : :hasPlayedAt hasPlayedAt a3 a3 (:hasPlayedAt only only :JazzConcert) and and (:hasPlayedAt some some :JazzConcert)

  15. OWL: Class Expressions CE:= ObjectAllValuesFrom(OPE CE) :Trumpeter :JazzConcert :RockConcert (contains all those individuals that if if they are connected by OPE to any individuals, then these individuals are instances of only only CE.) DataAllValuesFrom(DPE1 ... DPEn DR) ObjectMinCardinality(n OPE CE) DataMinCardinality(n DPE DR) ObjectMaxCardinality(2 a:hasPet) ObjectExactCardinality(1 a:hasPet a:Dog) a2 a5 : :hasPlayedAt hasPlayedAt : :hasPlayedAt hasPlayedAt a4 a1 a1 : :hasPlayedAt hasPlayedAt a3 a3

  16. OWL: Class Expressions CE:= ObjectAllValuesFrom(OPE CE) :Trumpeter :JazzConcert (contains all those individuals that if if they are connected by OPE to any individuals, then these individuals are instances of only only CE.) DataAllValuesFrom(DPE1 ... DPEn DR) ObjectMinCardinality(n OPE CE) DataMinCardinality(n DPE DR) ObjectMaxCardinality(2 a:hasPet) ObjectExactCardinality(1 a:hasPet a:Dog) a2 : :hasPlayedAt hasPlayedAt a4 : :hasPlayedAt hasPlayedAt a1 a1 a3 a3 :hasPlayedAt atleast atleast 2 2 :JazzConcert

  17. OWL: Class Expressions CE:= ObjectAllValuesFrom(OPE CE) :Trumpeter :JazzConcert (contains all those individuals that if if they are connected by OPE to any individuals, then these individuals are instances of only only CE.) DataAllValuesFrom(DPE1 ... DPEn DR) ObjectMinCardinality(n OPE CE) DataMinCardinality(n DPE DR) ObjectMaxCardinality(2 a:hasPet) ObjectExactCardinality(1 a:hasPet a:Dog) a2 : :hasPlayedAt hasPlayedAt a4 : :hasPlayedAt hasPlayedAt a1 a1 a3 a3 :hasPlayedAt atleast atleast 2 2 :JazzConcert

  18. What have we achieved so far? We have explained what the things that one can define in OWL 2 are. Now let us see how to use these things to represent knowledge about a domain. In OWL 2 knowledge is represented by axioms: statements that say what is true in the domain of interest.

  19. Axioms SubClassOf(CE1 CE2) DisjointClasses(CE1 CE2) SubObjectPropertyOf(OPE1 OPE2) SubObjectPropertyOf(ObjectPropertyChain(OPE1 ... OPEn) OPE) (Person, Organization) (has defining Ingredient - hasIngredient) R1 R3 R2 RN x2 x1 xn x3 R DisjointObjectProperties(OPE1 ... OPEn) InverseObjectProperties(OPE1 OPE2) (hasParent - isParentOf) ObjectPropertyDomain(OPE CE) ObjectPropertyRange(OPE CE)

  20. Axioms FunctionalObjectProperty(OPE) InverseFunctionalObjectProperty(OPE) ReflexiveObjectProperty(OPE) IrreflexiveObjectProperty(OPE) SymmetricObjectProperty(OPE) AsymmetricObjectProperty(OPE) TransitiveObjectProperty(OPE) SubDataPropertyOf FunctionalDataProperty DatatypeDefinition(DT DR) DatatypeDefinition(a:SSN DatatypeRestriction(xsd:string xsd:pattern "[0-9]{3}-[0-9]{2}-[0-9]{4}")) (hasBiologicalMother) (biologicalMotherOf) (knows) (sibling) (hasPart) (hasLastName a:hasName) (a:hasAge)

  21. Axioms FunctionalObjectProperty(OPE) InverseFunctionalObjectProperty(OPE) ReflexiveObjectProperty(OPE) IrreflexiveObjectProperty(OPE) SymmetricObjectProperty(OPE) AsymmetricObjectProperty(OPE) TransitiveObjectProperty(OPE) SubDataPropertyOf FunctionalDataProperty DatatypeDefinition(DT DR) DatatypeDefinition(a:SSN DatatypeRestriction(xsd:string xsd:pattern "[0-9]{3}-[0-9]{2}-[0-9]{4}")) (hasBiologicalMother) (biologicalMotherOf) (knows) (sibling) (hasPart) (hasLastName a:hasName) (a:hasAge)

  22. Assertions SameIndividual(a1 ... an) DifferentIndividuals(a1 ... an) (OWL does not make the UNA) ClassAssertion(CE a) ObjectPropertyAssertion(OPE a1 a2) NegativeObjectPropertyAssertion(OPE a1 a2) DataPropertyAssertion(DPE a lt) NegativeDataPropertyAssertion(DPE a lt)

  23. Open World Assumption Contrary to databases, ontology technologies make the Open World Assumption. Absence of information is not interpreted as presence of negative information but simply as lack of knowledge.

  24. Exercise V Exercise V FunctionalObjectProperty(:hasBiologicalFather) :hasBiological Father :Stewie :Peter :hasBiological Father :Peter_Griffin What do we infer for :Peter and :Peter_Griffin?

  25. Solution Solution FunctionalObjectProperty(:hasBiologicalFather) :hasBiological Father :Stewie :Peter owl:sameIndividual :hasBiological Father :Peter_Griffin They are the same individual!

  26. Exercise VI Exercise VI FunctionalObjectProperty(:hasBiologicalFather) DifferentIndividuals(:Peter, :Peter_Griffin) :hasBiological Father :Stewie :Peter :hasBiological Father :Peter_Griffin What can we infer for our KB?

  27. Solution Solution FunctionalObjectProperty(:hasBiologicalFather) DifferentIndividuals(:Peter, :Peter_Griffin) :hasBiological Father :Stewie :Peter :hasBiological Father :Peter_Griffin Is inconsistent!

  28. OWL 2 Profiles OWL 2 EL: For ontologies that with very large number of classes and/or properties. For OWL 2 EL ontologies consistency, class expression subsumption, and instance checking can be decided in polynomial time. OWL 2 QL: sound and complete query answering can be done with LOGSPACE computational complexity with respect to the size of the data (assertions) Rather simple ontology Large volume of assertions OWL 2 RL: aimed at applications that require scalable reasoning without sacrificing too much expressive power. Can be translated into Datalog

  29. OWL Syntaxes The Functional-Style syntax. This syntax is designed to be easier for specification purposes and to provide a foundation for the implementation of OWL 2 tools such as APIs and reasoners The RDF/XML syntax: this is just RDF/XML, with a particular translation for the OWL constructs. Here one can use other popular syntaxes for RDF, e.g., Turtle syntax. The Manchester syntax: this is a frame-based syntax that is designed to be easier for users to read. The OWL XML syntax: this is an XML syntax for OWL defined by an XML schema.

  30. SWRL What about: if a child s parents are married to each other then it belongs to the class ChildOfMarriedParents

  31. SWRL What about: if a child s parents are married to each other then it belongs to the class ChildOfMarriedParents Child and (hasParent some (Parent and (marriedTo some Parent))) rdfs:SubclassOf ChildOfMarriedParents? :has Parent x:Child :marriedTo x:ChildOfMarried Parents y:Parent z:Parent But z may not be parent of x! We need somehow to link the specific entities z that y is married to, to x

  32. SWRL What about: if a child s parents are married to each other then it belongs to the class ChildOfMarriedParents Child and (hasParent some (marriedTo some Parent)) rdfs:SubclassOf ChildOfMarriedParents? y:Parent :has Parent x:Child :marriedTo x:ChildOfMarried Parents :has Parent z:Parent

  33. SWRL SWRL: Semantic Web Rule Language Child(?x) and hasParent(?x,?y) and hasParent(?x,?z) and marriedTo(?y,?z) ChildOfMarriedParents(?x) Basic structure: 1 1 and and 2 2and and and and n n n+1 n+1 i= A(x)|R(x,y) x, y = individual|variable Only variables that occur in the body of a rule may occur in the head

  34. SWRL SWRL: Semantic Web Rule Language Child(?x) and hasParent(?x,?y) and hasParent(?x,?z) and marriedTo(?y,?z) ChildOfMarriedParents(?x) Basic structure: 1 1 and and 2 2and and and and n n n+1 n+1 i= A(x)|R(x,y) x, y = individual|variable Only variables that occur in the body of a rule may occur in the head

  35. SWRL SWRL: is undecidable There is no algorithm that can draw all logical conclusions from all SWRL knowledge bases, even with unlimited time and resources To guarantee decidability, reasoners apply variable bindings only to individuals named explicitly in the KB. hasParent(Eleni, Maria) isMarriedTo(parentOf({Eleni})) (Maria) :hasParent :Maria :Eleni Child(?x) and hasParent(?x,?y) and hasParent(?x,?z) and :isMarriedTo :parentOf marriedTo(?y,?z) ChildOfMarriedParents(?x) ?y

  36. SWRL SWRL: is undecidable There is no algorithm that can draw all logical conclusions from all SWRL knowledge bases, even with unlimited time and resources To guarantee decidability, reasoners apply variable bindings only to individuals named explicitly in the KB. Child(:Eleni), hasParent(:Eleni, :Maria) hasParent(marriedTo({:Maria})) (:Eleni) :hasParent :Eleni :Child :Maria Child(?x) and hasParent(?x,?y) and hasParent(?x,?z) and :isMarriedTo :hasParent marriedTo(?y,?z) ChildOfMarriedParents(?x) ?y

  37. SWRL-built-ins Built-ins increase expressivity: Built-Ins for Comparisons: swrlb:equal, swrlb:notEqual, swrlb:lessThan, Math Built-Ins swrlb:add, swrlb:multiply, swrlb:pow, Built-Ins for Boolean Values swrlb:booleanNot Built-Ins for Strings swrlb:stringEqualIgnoreCase, swrlb:contains, Built-Ins for Date, Time and Duration swrlb:yearMonthDuration, swrlb:dateTime Built-Ins for Lists (RDF-style lists) swrlb:listConcat, swrlb:listIntersection,

  38. SWRL (+) Adds expressivity (+) More intuitive (-) Adds computational complexity (slows down processes) 38

  39. Resources RDF 1.1 Primer: https://www.w3.org/TR/2014/NOTE-rdf11-primer-20140624/ RDFS 1.1: https://www.w3.org/TR/rdf-schema/ OWL 2 Primer: https://www.w3.org/TR/owl2-primer/ SWRL: https://www.w3.org/Submission/SWRL/ More readings: Kr tzsch, M. (2012). OWL 2 Profiles: An Introduction to Lightweight Ontology Languages. In: Eiter, T., Krennwallner, T. (eds) Reasoning Web. Semantic Technologies for Advanced Query Answering. Reasoning Web 2012. Lecture Notes in Computer Science, vol 7487. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-33158-9_4

Related


More Related Content