Скачать презентацию Logics for Data and Knowledge Representation Ontology and Скачать презентацию Logics for Data and Knowledge Representation Ontology and

fe0a682dacf263912f82685eddcaa6e3.ppt

  • Количество слайдов: 85

Logics for Data and Knowledge Representation Ontology and OWL Logics for Data and Knowledge Representation Ontology and OWL

Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Family q Reasoning 2

Ontologies in Computer Science q Engineering artifact consisting of: q. A vocabulary used to Ontologies in Computer Science q Engineering artifact consisting of: q. A vocabulary used to describe a part of the world (view on a domain of interest). q An explicit specification of the intended meaning of the vocabulary. q Constraints capturing additional (“meta”) knowledge about the depicted domain. q Ideally, an ontology as an engineering artifact should: q capture a shared understanding of a domain of interest; q provide a formal and computable (machine manipulable) model (of the domain). 3

Example (Horrocks et. al. 2003) q. A suitable “pizza ontology” might include the information Example (Horrocks et. al. 2003) q. A suitable “pizza ontology” might include the information that: q Mozzarella and Gorgonzola are kinds of cheese; q cheese is not a kind of meat or fish; q a vegetarian pizza is one whose toppings do not include any meat or fish. q The information (knowledge) provided by the “pizza ontology” allows the term “pizza topped with Mozzarella and Gorgonzola” to be unambiguously interpreted (by, e. g. , a pizza ordering agent) as a specialisation of the term “vegetarian pizza”. 4

Ontology (a diagram of) 5 Ontology (a diagram of) 5

Where are Ontologies used? q e-Science: bioinformatics, . . . q Medicine q Databases: Where are Ontologies used? q e-Science: bioinformatics, . . . q Medicine q Databases: schema design, sharing, integration, matching, query-answering, . . . q User Interfaces q Semantic Web/Grid q Library Science: (subject) classification, . . . 6

Ontologies: History q. A philosophical (metaphisic) discipline aimed to understand organize the reality and Ontologies: History q. A philosophical (metaphisic) discipline aimed to understand organize the reality and the human ( “Science of Being” Aristotele). q Importantly, ontologies historically used to organizing knowledge in a domain of interest q Classification (e. g. Library science, CC, DDC, UDC Systems, . . . ) Photo "Bodleian Library - Oxford" by Chris Donaghue, © The Oxford Photo Library - CP 0497 7

Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Family q Reasoning 8

Properties of OLs should be… q OLs allow users to write explicit, formal conceptualizations Properties of OLs should be… q OLs allow users to write explicit, formal conceptualizations of domain models. q The qa main properties are: well-defined syntax q a formal semantics q an efficient reasoning support q sufficient expressive power q convenience of expression 9

Ontology Languages (OLs) q OLs introduce symbols for concepts (classes, entities), properties (attributes, roles), Ontology Languages (OLs) q OLs introduce symbols for concepts (classes, entities), properties (attributes, roles), relationships between concepts (associations), and additional constraints. q Ontology languages may be simple (e. g. , having only concepts), frame-based (e. g. , having only concepts and properties), or logic-based (e. g. Ontolingua, DAML+OIL). q Ontology languages are typically expressed by means of diagrams (graphs), such as Semantic Networks q UML q RDF (Resource Description Framework) q RDFS (RDF Schema) q q or 10 logic such as OWL.

Diagram Languages q Semantic q UML q ER q RDFS 11 Networks Diagram Languages q Semantic q UML q ER q RDFS 11 Networks

Demands for OLs q In order to allow sharing and reuse of ontologies on Demands for OLs q In order to allow sharing and reuse of ontologies on the Semantic Web, a common ontology language is required. q The W 3 C has developed two ontology languages for use on the Semantic Web: q RDFS [Brickley & Guha, 2004], developed as a lightweight ontology language. q OWL [Dean & Schreiber, 2004]. . . see next 12

Why not simply XML? q XML provides a framework for interchange of data/metadata between Why not simply XML? q XML provides a framework for interchange of data/metadata between applications. q XML does not provide any means of talking about the semantics (meaning) of data. q q 13 E. g. , there is no intended meaning associated with the nesting of tags. It is up to each application to interpret the data and metadata (eg. the nesting).

From XML to RDF Example q q David Billington is a lecturer of Discrete From XML to RDF Example q q David Billington is a lecturer of Discrete Maths In XML: David Billington or Discrete Maths q 14 Opposite nesting, same information!

Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Family q Reasoning 15

Basic RDF Triples q Basic building blocks are called statements, i. e. , object-attribute-value Basic RDF Triples q Basic building blocks are called statements, i. e. , object-attribute-value triples. q E. g. , “A lecturer names Rui Zhang”. q q 16 RDF has been given a syntax in XML. Other syntactic representations of RDF, not based on XML, are possible.

Fundamental of RDF q The fundamental concepts of RDF are: q resources q properties Fundamental of RDF q The fundamental concepts of RDF are: q resources q properties q statements 17 (object-attribute-value triples)

Resources q We can think of a resource as an object, a “thing” we Resources q We can think of a resource as an object, a “thing” we want to talk about (e. g. authors, books, publishers, places, people, hotels, . . . ). q Every resource has a URI, a Universal Resource Identifier. A URI can be: qa URL (Unified Resource Locator, i. e. a Web address), or q some other kind of unique identifier. 18

Properties q Properties are a special kind of resources, which describe relations between resources. Properties q Properties are a special kind of resources, which describe relations between resources. (E. g. “written by”, “age”, “title”, . . . ) q In terms of logic, properties are predicates (FOL) or roles (DLs, only if the property is binary, that is, it involves two resources. ) q Properties q This 19 are also identified by URIs/URLs. is good in the Web (unique naming).

Statements q Assertions about the properties of resources (relations of objects). q In terms Statements q Assertions about the properties of resources (relations of objects). q In terms of logic, statements are wffs (FOL) or concept descriptions (DLs). q. A statement is an object-attribute-value triple: resource, property, value. q Values can be resources or literals. q Literals are atomic values (strings). 20

RDF Documents q. A statement can be represented by qa triple, q a (piece RDF Documents q. A statement can be represented by qa triple, q a (piece of) graph, q a (piece of) XML code. q Thus qa an RDF document can be viewed as: set of triples q a graph (semantic net) q an XML document (with tag rdf: RDF). 21

Example of RDF Triples q Take the statement: Fausto Giunchiglia is a professor of Example of RDF Triples q Take the statement: Fausto Giunchiglia is a professor of LDKR. q It can be seen as a triple (a, P, b): (“Fausto Giunchiglia”, URI 1, URI 2) q For URI 1=“http: //disi. unitn. it/perople#professor” q URI 2=“http: //disi. unitn. it/~ldkr” q In terms of logic, (a, P, b) can be seen as an ABox in DL as P(a, b). 22

Summary of RDF/RDFS q Using RDFS we can: q declare classes: Country, Person, Student; Summary of RDF/RDFS q Using RDFS we can: q declare classes: Country, Person, Student; q state that Student is a subclass of Person; q state that Canada and England are both instances of the class Country; q declare Nationality as a property relating the classes Person and Country; q state that age is a property, with Person as its domain and integer as its range; q state that Peter is an instance of the class Canadian, and that his age has value 48. 23

But… q The RDFS ontology language has some strong limitations in its expressive power: But… q The RDFS ontology language has some strong limitations in its expressive power: q Local scope of properties q Disjointness of classes q Boolean combinations of classes q Cardinality restrictions q Special characteristic of properties q transitivity - e. g. “is greater than” q functionals - e. g. “is mother of” q inverse - e. g. “has. Child” for “is. Child. Of” q symmetrical - e. g. “touches” q No 24 efficient reasoning support/service. (Informal Sem. )

Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Family q Reasoning 25

OWL History OWL [Dean & Schreiber, 2004] is a more expressive ontology language based OWL History OWL [Dean & Schreiber, 2004] is a more expressive ontology language based on DLs. q Developed by W 3 C’s Web-Ontology (Web. Ont) Working Group (2004). q Starting language was an extension of RDF/RDFS languages, called DAML+OIL. q DAML+OIL is a combination of American language DAMLONT and European’s OIL. q Now OWL is a W 3 C Recommendation (i. e. a standard, like HTML and XML). q OWL (and DAML+OIL as well) is based on description logic, in particular SHOIN(D) DL (we’ll see this in a few slides). q In fact OWL is a “web friendly” syntaxt for SHOIN(D) (quote attributed to I. Horrocks). q 26

From the view of Semantic Web Structure OWL (Peter F. Patel-Schneider, 2002) 27 (Antoniou From the view of Semantic Web Structure OWL (Peter F. Patel-Schneider, 2002) 27 (Antoniou & van Harmelen, 2004)

From RDF to OWL q OWL is defined as an extension to RDF in From RDF to OWL q OWL is defined as an extension to RDF in the form of a vocabulary entailment: q the syntax of OWL is the syntax of RDF; q the semantics of OWL is an extension of the semantics of RDF/RDFS. q OWL uses RDF’s XML-based syntax. q Alternative syntax: abstract, UML-based, . . . 28

OWL RDF/XML Exchange Syntax “Define those persons who has a doctor as offspring. ” OWL RDF/XML Exchange Syntax “Define those persons who has a doctor as offspring. ” (Horrocks CISA-06) 29

OWL and DLs q How do we express the OWL description of previous slide OWL and DLs q How do we express the OWL description of previous slide in DL? q Solution: Person ⊓ ∀has. Child. (Doctor⊔∃has. Child. Doctor) q OWL RDF/XML syntax is verbose, much more than DL syntax! 30

Exercise the following XML code: (Horrocks et. al. JWS-03) q Take How do we Exercise the following XML code: (Horrocks et. al. JWS-03) q Take How do we express it in DL? 31

Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Family q Reasoning 32

Syntax 33 Syntax 33

OWL Syntactic Varieties q OWL uses RDF’s XML-based syntax. q Other syntax forms for OWL Syntactic Varieties q OWL uses RDF’s XML-based syntax. q Other syntax forms for OWL are: q. A more readable XML-based syntax q Abstract syntax, more compact than XML-based syntax q Graphic-based syntax, based on UML q Now we present RDF’s XML-based syntax. [G. Antoniou and F. van Harmelen “A Semantic Primer, ” ch. 4 (slides)] 34

XML/RDF Syntax: Header q. An OWL ontology may start with a collection of assertions XML/RDF Syntax: Header q. An OWL ontology may start with a collection of assertions for housekeeping purposes using “owl: Ontology” element. 35

owl: Ontology owl: imports is a transitive property. 36 owl: Ontology owl: imports is a transitive property. 36

Classes q Classes are defined using “owl: Class”. owl: Class is a subclass of Classes q Classes are defined using “owl: Class”. owl: Class is a subclass of rdfs: Class q Disjointness: “owl: Disjoint. With” 37

Classes cont. : Thing and Nothing q Equivalent classes are defined using “owl: equivalent. Classes cont. : Thing and Nothing q Equivalent classes are defined using “owl: equivalent. Class”. q The most general class (Universal Class): owl: Thing q The empty class: owl: Nothing 38

Datatype Properties q OWL 39 uses XML Schema data types. Datatype Properties q OWL 39 uses XML Schema data types.

Object Properties q User-defined 40 datatypes. Object Properties q User-defined 40 datatypes.

Inverse Properties 41 Inverse Properties 41

Equivalent Properties 42 Equivalent Properties 42

Property Restrictions q. A (restriciton) class is defined through an “owl: Restriction” element. q Property Restrictions q. A (restriciton) class is defined through an “owl: Restriction” element. q This element contains an “owl: on. Property” element and one or more restriction declatations. q Restriction declarations are: q cardinality restrictions (at-least/at-most n) q value restrictions (see the next slide). 43

Value Restrictions q These fix the values a property may take: q “owl: all. Value Restrictions q These fix the values a property may take: q “owl: all. Values. From” specifies universal quantification q “owl: has. Value” specifies a certain value q “owl: some. Values. From” specifies existential quantification 44

owl: all. Values. From 45 owl: all. Values. From 45

owl: has. Value 46 owl: has. Value 46

owl: some. Values. From 47 owl: some. Values. From 47

Cardinality Restrictions q “owl: min. Cardinality” and “owl: max. Cardinality” specify minimum and maximum Cardinality Restrictions q “owl: min. Cardinality” and “owl: max. Cardinality” specify minimum and maximum number of individuals (objects) a property applies. q It is possible to specify a precise number (integer) by using the same minimum and maximum number. q To specify meanwhile at most and at least the same number of individuals. q OWL 48 offers also “owl: cardinality”.

owl: min. Cardinality 49 owl: min. Cardinality 49

Characteristics of Properties q “owl: Transitive. Property” specify the transitivity, e. g. is. Ancestor. Characteristics of Properties q “owl: Transitive. Property” specify the transitivity, e. g. is. Ancestor. Of. q “owl: Symmetric. Property” specifies the symmetry, e. g. same. Of. q “owl: Functional. Property” specifies the existance of at most one value E. g. , age, height, direct. Part. Of, . . . 50

Boolean Combinations q In OWL we can define new classes by a Boolean combination Boolean Combinations q In OWL we can define new classes by a Boolean combination of existing classes q owl: union. Of E. g. , LDKRpeople = Students ∪ Lecturers. q owl: intersection. Of E. g. , faculty. CS = faculty. Science ∩ CSdept q owl: complement. Of E. g. , Male = not Female 51

owl: union. Of Remark: Using owl: union. Of we define a new (union) class owl: union. Of Remark: Using owl: union. Of we define a new (union) class that is equivalent to the union of the two existing classes. 52

owl: intersection. Of 53 owl: intersection. Of 53

owl: complement. Of 54 owl: complement. Of 54

Nesting of Booleans (Example) 55 Nesting of Booleans (Example) 55

owl: one. Of (Enumerations) 56 owl: one. Of (Enumerations) 56

Declaring Instances q Instances 57 in a class are declared as in RDF. Declaring Instances q Instances 57 in a class are declared as in RDF.

owl: different. From (Distinct Objects) q In OWL if two individuals have a different owl: different. From (Distinct Objects) q In OWL if two individuals have a different name (ID) it does not imply that these are different individuals (UN Assumption). q So me must state explicitely the inequality. 58

owl: all. Different (Distinct Objects, cont’) q In OWL we can assert that a owl: all. Different (Distinct Objects, cont’) q In OWL we can assert that a set of individuals (objects) are pairwise distinct. 59

Semantics? DL semantics Self –evident 60 Semantics? DL semantics Self –evident 60

Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Family q Reasoning 61

Three Siblings of OWL q OWL consists of three siblings, namely q OWL Lite Three Siblings of OWL q OWL consists of three siblings, namely q OWL Lite q OWL DL q OWL Full. q These languages are intended to be layered according to increasing expressiveness. q Each language is based on a specific description logic (we see it in a few slides). q OWL Lite / OWL DL by far the most used. 62

OWL Full, DL, Lite q OWL Lite : supports those users primarily needing a OWL Full, DL, Lite q OWL Lite : supports those users primarily needing a classification hierarchy and simple constraints. q OWL DL : supports those users who want the maximum expressiveness while retaining computational completeness. q OWL Full : is meant for users who want maximum expressiveness and the syntactic freedom of RDF with no computational guarantees. 63

More Precise on OWL Full, DL, Lite q OWL Full : union of OWL More Precise on OWL Full, DL, Lite q OWL Full : union of OWL syntax and RDF. q RDF semantics extended with relevant semantic conditions and axiomatic triples. q OWL DL : restricted to DL/FOL fragment (DAML+OIL). We are mostly interested in OWL DL. q OWL Lite : subset of OWL DL easier to implement; tools/implementations available. 64

Synopsis of OWL Lite 65 Synopsis of OWL Lite 65

Synopsis of OWL DL/Full 66 Synopsis of OWL DL/Full 66

OWL: Lite versus DL q OWL DL adds very little in expressiveness to OWL OWL: Lite versus DL q OWL DL adds very little in expressiveness to OWL Lite [Horrocks & Patel-Schneider, JWS 2003]. q OWL Lite and OWL DL pose several restrictions on the use of RDF and redefine the semantics of the RDFS primitives. q NB: OWL Lite and OWL DL are not properly layered on top of RDFS. 67

OWL: DL versus Full q OWL Full layers on top of both RDFS and OWL: DL versus Full q OWL Full layers on top of both RDFS and OWL DL. q NB: Because of RDFS and OWL DL are so different, the semantics of OWL Full is not a proper extension of OWL DL’s semantics: In fact, OWL DL has a model-theoretic semantics; RDFS has an axiomatic semantics. RDFS has also a more syntactical freedom. 68

Layering Problems q The lack of proper layering between (1) RDFS and OWL DL Layering Problems q The lack of proper layering between (1) RDFS and OWL DL / OWL Lite, and (2) OWL DL / OWL Lite and OWL Full raises doubts about interoperability between ontologies written in these languages. q Problems arise especially in the areas of Software Engineering and Database Systems. [Bruijn, Pollers, Lara & Fensel, 2005] 69

OWL as a DL-based Language q Without regarding annotation properties of OWL as a OWL as a DL-based Language q Without regarding annotation properties of OWL as a web language (cf. RDF/XML), q OWL Lite is equivalent to SHIF(D) DL; q OWL DL is equivalent to SHOIN(D) DL. q The q So, “D” above means “datatypes. ” an OWL ontology is equivalent to a DL knowledge base (TBox + ABox). 70

Datatypes q (Concrete) datatypes are used to represent literal values such as numbers and Datatypes q (Concrete) datatypes are used to represent literal values such as numbers and strings. q. A type system typically defines a set of “primitive” datatypes, such as string or integer, and provides a mechanism for deriving new datatypes from existing ones. q DLs SHIF(D) and SHOIN(D) allow the definition and use of a number of datatypes. 71

Why OWL as a Logic ? q OWL q well exploits results of 20+ Why OWL as a Logic ? q OWL q well exploits results of 20+ years of DL research defined (model-theoretic) semantics q formal properties well understood (e. g. , complexity, decidability) q known reasoning algorithms q implemented systems (highly optimized) 72

Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Outline q Ontologies q Ontology Languages q RDF q OWL q Syntax q OWL Family q Reasoning 73

Reasoning Services on Ontology Knowledge q Class membership (Instance checking): If individual a is Reasoning Services on Ontology Knowledge q Class membership (Instance checking): If individual a is an instance of a class C and C is a subclass of D, then infer that a is an instance of C. q Equivalence of classes: If class A is equivalent to class B and B is equivalent to class C, then A and C are equivalent. q Consistency: An individual a is an instance of classes A and B, but A and B are disjoint. q Consistency checking allows to discover an error in the ontology. q Classification: Certain property-value pairs are a sufficient condition for membership in a class (cf. definitions in DLs). If a satisfies such conditions we classified it! 74

Uses of Reasoning Services q Reasoning services are important for: (automatically) checking the consistency Uses of Reasoning Services q Reasoning services are important for: (automatically) checking the consistency of an ontology and the knowledge therein; q (automatically) checking for unintended relationships between classes; q (automatically) classifying “objects” from a domain of interest (∆, the “world”) into classes (concepts). q q Checking like the preceding are used for: design and maintain high quality / large /complex / distributed ontologies q integrating, sharing, matching of ontologies from different sources q correct and capture intuitions of experts, q answer queries, retrieve objects/tuples, . . . q 75

Reasoning Services for OWL q Formal semantics is a prerequisite for reasoning services (please Reasoning Services for OWL q Formal semantics is a prerequisite for reasoning services (please see slides on DLs). q Semantics and reasoning services are usually provided by: q Semantics: mapping the ontology language to a known formalism - i. e. a certain DL! q Reasoning: using some automated reasoners existing for that formalism. 76

OWL Reasoning q Computing ontology entailment in OWL DL (OWL Lite) has the same OWL Reasoning q Computing ontology entailment in OWL DL (OWL Lite) has the same complexity as computing KB SAT in SHOIN(D) (SHIF(D)). q DL algorithms and implementations can be used to provide reasoning services for OWL Lite. [Horrocks & Patel-Schneider, ISWC-03] q The design of “practical” algorithms for SHOIN(D) is still a hot research topic. 77

Using Standard DL Techniques q State of the art DL systems typically use highly Using Standard DL Techniques q State of the art DL systems typically use highly optimized tableaux algorithms to decide KB satisfiability (consistency). q Tableaux algorithms work by trying to construct a concrete example (i. e. a model) consistent with the KB axioms. Two steps: - start from Abox axioms (the ground facts) - check implications using TBox axioms. 78

Improving Scalability q Reasoning is hard (NExp. Time-complete for OWL-DL). q (Web) ontologies may Improving Scalability q Reasoning is hard (NExp. Time-complete for OWL-DL). q (Web) ontologies may grow very large. q Good empirical evidence of scalability/tractability for reasoning with DL systems. q Reasoning with individuals may be problematical in the web, where there are large numbers of individulas to cope with. 79

Other Reasoning Services q More advanced reasoning services for a DL KRsystem aim to Other Reasoning Services q More advanced reasoning services for a DL KRsystem aim to answer the following: 1. Querying (retrieval, realization) 2. Explanation 3. Non-standard inference (e. g. matching) 4. Design methodologies q We 80 briefly present each in turn.

Querying (Retrieval) q Definition (Retrieval Reasoning Service). Given an ABox A and concept C, Querying (Retrieval) q Definition (Retrieval Reasoning Service). Given an ABox A and concept C, find the individuals ‘a’ such that A |= C(a), i. e. , define the set {a ∈ ∆ | A |= C(a)} for all interpretations (∆, I) s. t. I(a) = a. q Example. Suppose KB |= Professor(Paolo). Then we obtain the retrieval set {Paolo}. 81

Querying (Realization) q Definition (Realization Reasoning Service). Given an ABox A, an individual ‘a’ Querying (Realization) q Definition (Realization Reasoning Service). Given an ABox A, an individual ‘a’ and a set Γ of concepts, find the most specific concepts C ∈ Γ such that A |= C(a), i. e. , define the set {C ∈ L | A |= C(a)} for a DL-language L and for all its interpretations (∆, I) s. t. I(a) = a. q Ex. (cont’). {Professor} is the realization set. 82

Tools and Infrastructure q Editors and environments: Olied, Protege, Swoop, Construct, etc. q Reasoning Tools and Infrastructure q Editors and environments: Olied, Protege, Swoop, Construct, etc. q Reasoning Systems: Cerebrea, Fa. CT++, Pellet, Racer, Kaon 2, . . . 83

Some Resources q Fa. CT++ system (open source): - http: //owl. man. ac. uk/factplus/ Some Resources q Fa. CT++ system (open source): - http: //owl. man. ac. uk/factplus/ q Protege system: - http: //protege. stanford. edu/plugins/owl/ q W 3 C Web-Ontology (Web. Ont) WG: - http: //www. w 3. org/2001/sw/Web. Ont/ q DL Handbook: - http: //books. cambridge. org/0521781760. html 84

Credits q Thanks to the authors of: q [Horrocks & Sattler, IJCAI-01] q [Horrocks, Credits q Thanks to the authors of: q [Horrocks & Sattler, IJCAI-01] q [Horrocks, Patel-Schneider & van Harmelen, J. Web Semantics 2003] q [Horrocks & Patel-Schneider, ISWC-03]. q [Antoniou & van Harmelen, 2003] (textbook & slides) q [G. Antoniou and F. van Harmelen “A Semantic Primer, ” ch. 4 (slides)] 85