程序代写代做代考 scheme A Discussion of Some Intuitions of Defeasible Reasoning

A Discussion of Some Intuitions of Defeasible Reasoning

Chapter 4
A Semantic Web Primer
1
Lecture 7

Chapter 4
Web Ontology Language: OWL
Grigoris Antoniou
Frank van Harmelen

A Semantic Web Layer Stack

A reasoner expands the number of triples based on relations like rdfs:subClassOf, rdfs:range, rdfs:domain, etc.

Chapter 1
A Semantic Web Primer
3

In this lecture you will learn about OWL:

OWL adds semantics to the schema.

With OWL you can add more about classes and properties.

OWL has the ability to say two entities are the same, useful when merging datasets.

Chapter 1
A Semantic Web Primer
4

Chapter 4
A Semantic Web Primer
5
Lecture Outline
Basic Ideas of OWL
The OWL Language
Examples
The OWL Namespace
Future Extensions

Chapter 4
A Semantic Web Primer
6
Requirements for Ontology Languages
Ontology languages allow users to write explicit, formal conceptualizations of domain models
There are five requirements with any Ontology language:
a well-defined syntax
efficient reasoning support
a formal semantics
sufficient expressive power
convenience of expression

6

Chapter 4
A Semantic Web Primer
7
Tradeoff between Expressive Power and Efficient Reasoning Support
The richer the language is, the more inefficient the reasoning support.
Therefore, we need a compromise:
On the one hand a language supported by reasonably efficient reasoners.
On the other hand, a language that can express large classes of ontologies and knowledge.

Why does efficient reasoning conflict with expressiveness?

Chapter 4
A Semantic Web Primer
9
Reasoning About Knowledge in Ontology Languages
Class membership
If x is an instance of a class C, and C is a subclass of D, then we can infer that x is an instance of D
Equivalence of classes
If class A is equivalent to class B, and class B is equivalent to class C, then A is equivalent to C, too

Chapter 4
A Semantic Web Primer
10
Reasoning About Knowledge in Ontology Languages (2)
Consistency
X instance of classes A and B, but A and B are disjoint
This is an indication of an error in the ontology
Classification
Certain property-value pairs are a sufficient condition for membership in a class A; if an individual x satisfies such conditions, we can conclude that x must be an instance of A

If it looks like a duck, swims like a duck, and quacks like a duck, then it probably is a duck.

Chapter 4
A Semantic Web Primer
11
Uses for Reasoning
Reasoning support is important for
checking the consistency of the ontology and the knowledge
checking for unintended relationships between classes
automatically classifying instances in classes
Checks like the preceding ones are valuable for
designing large ontologies, where multiple authors are involved
integrating and sharing ontologies from various sources

Chapter 4
A Semantic Web Primer
12
Reasoning Support for OWL
Semantics is a prerequisite for reasoning support
Formal semantics and reasoning support are usually provided by
mapping an ontology language to a known logical formalism
using automated reasoners that already exist for those formalisms
OWL is (partially) mapped on a description logic, and makes use of reasoners such as Pellet, FaCT and RACER
Description logics are a subset of predicate logic for which efficient reasoning support is possible

Chapter 4
A Semantic Web Primer
13
OWL vs. RDF Schema
Combining RDF Schema with logic leads to uncontrollable computational properties

Ideally, OWL would extend RDF Schema
Consistent with the layered architecture of the Semantic Web

Chapter 4
A Semantic Web Primer
14
The five major limitations of the Expressive Power of RDF Schema in comparison with OWL
(i) Local scope of properties
rdfs:range defines the range of a property (e.g. eats) for all classes
In RDF Schema we cannot declare range restrictions that apply to some classes only
E.g. we cannot say that cows eat only plants, while other animals may eat meat, too
In RDF Schema this is not possible, but in OWL, this is possible.

Chapter 4
A Semantic Web Primer
15
Limitations of the Expressive Power of RDF Schema (2)
(ii) Disjointness of classes
Sometimes we wish to say that classes are disjoint (e.g. graduate and undergraduate).
In RDF Schema this is not possible, but in OWL, this is possible
(iii) Boolean combinations of classes
Sometimes we wish to build new classes by combining other classes using union, intersection, and complement
E.g. university-student is the disjoint union of the classes graduate and undergraduate (assuming no student in the university can study two courses at the same time.)
In RDF Schema this is not possible, but in OWL, this is possible

Chapter 4
A Semantic Web Primer
16
Limitations of the Expressive Power of RDF Schema (3)
(iv) Cardinality restrictions
E.g. a person has exactly two parents, a course is taught by at least one lecturer
In RDF Schema this is not possible, but in OWL, this is possible
(v) Special characteristics of properties
Transitive property (like “greater than”)
Unique property (like “is mother of”)
A property is the inverse of another property (like “eats” and “is eaten by”)
In RDF Schema this is not possible, but in OWL, this is possible

Chapter 4
A Semantic Web Primer
17
Three Species of OWL
W3C’sWeb Ontology Working Group defined OWL as three different sublanguages:
OWL Full
OWL DL
OWL Lite
Each sublanguage geared toward fulfilling different aspects of requirements

Chapter 4
A Semantic Web Primer
18
OWL Full
uses all the OWL languages primitives
allows the combination of these primitives in arbitrary ways with RDF and RDF Schema
OWL Full is fully upward-compatible with RDF, both syntactically and semantically
OWL Full is is undecidable
No complete (or efficient) reasoning support

Chapter 4
A Semantic Web Primer
19
OWL DL
OWL DL (Description Logic) is a sublanguage of OWL Full
OWL DL permits efficient reasoning support
But we lose full compatibility with RDF:
Not every RDF document is a legal OWL DL document.
Every legal OWL DL document is a legal RDF document.

Chapter 4
A Semantic Web Primer
20
OWL Lite
Easier to
grasp, for users
implement, for tool builders
Restricted expressivity

Chapter 4
A Semantic Web Primer
21
Upward Compatibility between OWL Species
Every legal OWL Lite ontology is a legal OWL DL ontology
Every legal OWL DL ontology is a legal OWL Full ontology

Chapter 4
A Semantic Web Primer
22
A Figure showing OWL Compatibility with RDF Schema
All varieties of OWL use
RDF for their syntax
Instances are declared
as in RDF, using RDF
descriptions

Chapter 4
A Semantic Web Primer
23
Lecture Outline
Basic Ideas of OWL
The OWL Language
Examples
The OWL Namespace
Future Extensions

Chapter 4
A Semantic Web Primer
24
OWL Syntactic Varieties
OWL builds on RDF and uses RDF’s XML-based syntax
Other syntactic forms for OWL have also been defined:
An alternative, more readable XML-based syntax
An abstract syntax, that is much more compact and readable than the XML languages
A graphic syntax based on the conventions of UML

Chapter 4
A Semantic Web Primer
25
OWL XML/RDF Syntax: Header

Chapter 4
A Semantic Web Primer
26
owl:Ontology

An example OWL ontology


University Ontology

owl:imports is a transitive property
about=”” means the xml:base (current document), show in the next slide

Source:https://protegewiki.stanford.edu/wiki/How_Owl_Imports_Work

Chapter 1
A Semantic Web Primer
27

owl:imports .

This statement tells tools such as Protege or reasoners that the pizza ontology should import an ontology whose name is http://protege.stanford.edu/plugins/owl/protege.

Source:https://protegewiki.stanford.edu/wiki/How_Owl_Imports_Work

Chapter 1
A Semantic Web Primer
28

The way imports work in OWL 2.0 is different than the way that imports work in OWL 1.0.
The short story is that the OWL 2.0 group has chosen import by location (URL instead of URI)
The OWL 2.0 scheme has not been fully implemented by either Protégé 3 nor Protégé 4, though both editors will load such import statements.
This new scheme will be fully supported by future versions of the OWL API and next versions of Protégé.
Chapter 1
A Semantic Web Primer
29

Chapter 4
A Semantic Web Primer
30
Classes
Classes are defined using owl:Class
owl:Class is a subclass of rdfs:Class
Disjointness is defined using owl:disjointWith




Chapter 4
A Semantic Web Primer
31
Classes (2)
owl:equivalentClass defines equivalence of classes



owl:Thing is the most general class, which contains everything
owl:Nothing is the empty class

Chapter 4
A Semantic Web Primer
32
Properties
In OWL there are two kinds of properties
Object properties, which relate objects to other objects
E.g. is-TaughtBy, supervises
Data type properties, which relate objects to datatype values
E.g. phone, title, age, etc.

Chapter 4
A Semantic Web Primer
33
Datatype Properties
OWL makes use of XML Schema data types, using the layered architecture of the Semantic Web


Chapter 4
A Semantic Web Primer
34
Object Properties
User-defined data types





Chapter 4
A Semantic Web Primer
35
Inverse Properties




Chapter 4
A Semantic Web Primer
36
Equivalent Properties
owl:equivalentProperty


Chapter 4
A Semantic Web Primer
37
Property Restrictions
In OWL we can declare that the class C satisfies certain conditions
All instances of C satisfy the conditions
This is equivalent to saying that C is subclass of a class C’, where C’ collects all objects that satisfy the conditions
C’ can remain anonymous

Chapter 4
A Semantic Web Primer
38
Property Restrictions (2)
A (restriction) class is achieved through an owl:Restriction element
This element contains an owl:onProperty element and one or more restriction declarations
One type defines cardinality restrictions (at least one, at most 3,…)

Chapter 4
A Semantic Web Primer
39
Property Restrictions (3)
The other type defines restrictions on the kinds of values the property may take
owl:allValuesFrom specifies universal quantification
∀ (the universal quantifier symbol)
owl:hasValue must have at least one value X
owl:someValuesFrom specifies existential quantification
∃ (read: “there exists”).

Chapter 4
A Semantic Web Primer
40
owl:allValuesFrom
Write the equivalence in English








ANSWER
Only professors teach first-year subjects
Chapter 1
A Semantic Web Primer
41

Chapter 4
A Semantic Web Primer
42
owl:hasValue
Write the equivalence in English








Which one is correct?

1) All of the math courses must have a value #949352 for their isTaugBy property.
2) One of the math courses is taught by #949352
3) All math courses must be taught by #949352 AND maybe others.

Chapter 4
A Semantic Web Primer
44
Cardinality Restrictions
We can specify minimum and maximum number using owl:minCardinality and owl:maxCardinality
It is possible to specify a precise number by using the same minimum and maximum number
For convenience, OWL offers also owl:cardinality

Chapter 4
A Semantic Web Primer
45
Cardinality Restrictions (2)





1



Chapter 4
A Semantic Web Primer
46
Special Properties
owl:TransitiveProperty (transitive property)
E.g. “has better grade than”, “is ancestor of”
owl:SymmetricProperty (symmetry)
E.g. “has same grade as”, “is sibling of”
owl:FunctionalProperty defines a property that has at most one value for each object
E.g. “age”, “height”, “directSupervisor”
owl:InverseFunctionalProperty defines a property for which two different objects cannot have the same value

Write three examples for each of transitive and symmetric properties .
Chapter 1
A Semantic Web Primer
47

ANSWER
SYMETRIC:
1]”X isMarriedTo Y” means “Y isMarriedTo X”.
2]”Z equals D“ means “D equals Z“
3]” A co-worker-of B” means ” B co-worker-of A”
TRANSITIVE:
1]if A implies B and B implies C, then A implies C
2]if “Z equals D” and “D equals E” means
“Z equalls E“
3]if “X sub-set-of Y” and “Y sub-set-of Z” means
“X sub-set Z“

Chapter 1
A Semantic Web Primer
48

Chapter 4
A Semantic Web Primer
49
Special Properties (2)





https://www.w3.org/TR/2004/REC-owl-guide-20040210/

Chapter 1
A Semantic Web Primer
50

The complementOf construct selects all individuals from the domain of discourse that do not belong to a certain class. Usually this refers to a very large set of individuals:




Chapter 1
A Semantic Web Primer
51
Source : http://www.w3.org/TR/rdf-sparql-query/

Chapter 4
A Semantic Web Primer
52
Boolean Combinations
We can combine classes using Boolean operations (union, intersection, complement)







Chapter 4
A Semantic Web Primer
53
Boolean Combinations (2)





The new class is not a subclass of the union, but rather equal to the union

Chapter 4
A Semantic Web Primer
54
Boolean Combinations (3)








Chapter 4
A Semantic Web Primer
55
A Question:
Assuming #staffMember, #faculty, and #techSupportStaff” have all been defined as cllasses, by the use of nesting Boolean operators, complete the following code for defining adminStaff. Please indent statements for the sake of clarity.


……………………………………………..
………………………………………………
……………………………………………….
………………………………………………

Hint:

#staffMember = #adminStaff+#faculty+#techSupportStaff

The Diagram:

Chapter 4
A Semantic Web Primer
56
ANSWER














#staffMember = #adminStaff+#faculty+#techSupportStaff

The Diagram:

EXAMPLES:



 
 



Chapter 1
A Semantic Web Primer
57

EXAMPLES:

Note that, the same as abbreviating in RDF, the following is identical in meaning to the example above.











Chapter 1
A Semantic Web Primer
59

Interestingly, it is now possible to expand the definition of Wine to include the notion that a wine is made from at least one WineGrape. As with property definitions, class definitions have multiple subparts that are implicitly conjoined.
In the next slide you can see it:
Source: https://www.w3.org/TR/owl-guide/

Chapter 1
A Semantic Web Primer
60







1




Chapter 1
A Semantic Web Primer
61

Chapter 1
A Semantic Web Primer
62

/docProps/thumbnail.jpeg