Ontology OWL Semantic Web Fall 2005 Computer Engineering
Ontology & OWL Semantic Web - Fall 2005 Computer Engineering Department Sharif University of Technology
Outline Introduction & Definitions p Ontology Languages p OWL p
Where does it come from? p ontology n. 1692; lat. phil. onto- “being” + -logia “study of” p Philosophy n p The study of what is, what has to be true for something to exist, the kinds of things that can exist AI and computer science n Co-opted the term. Something exists if it can be represented, described, defined (in a formal, hence, machine-interpretable way).
Ontologies
Ontologies (contd. ) p p p Ontologies are about vocabularies and their meanings, with explicit, expressive, and welldefined semantics, possibly machine-interpretable. “Ontology is a formal specification of a conceptualization. ” Gruber, 1993 Main elements of an ontology: n n Concepts Relationships p p n n Hierarchical Logical Properties Instances (individuals)
A Definition p Informal n Terms p p n n n from a specific domain uniquely defined, usually via natural language definitions May contain additional semantics in the form of informal relations machine-processing is difficult Examples p p p Controlled vocabulary Glossary Thesaurus
A Definition p Formal n n Domain-specific vocabulary Well-defined semantic structure p Classes/concepts/types § E. g. , a class { Publication } represents all publications § E. g. , a class { Publication } can have subclasses { Newspaper }, { Journal } p Instances/individuals/objects § E. g. , the newspaper Le Monde is an instance of the class { Newspaper } p Properties/roles/slots § Data § E. g. , the class { Publication } and its subclasses { Newspaper }, { Journal } have a data property { number. Of. Pages } § Object § E. g. , the class { Publication } and its subclasses { Newspaper }, { Journal } have an object property { publishes } n Is machine-processable
Ontologies in the Semantic Web Provide shared data structures to exchange information between agents p Can be explicitly used as annotations in web sites p Can be used for knowledge-based services using other web resources p Can help to structure knowledge to build domain models (for other purposes) p
Meaning is in Connections is made from G a m e Grape a i n r f W Wine m s d e i e r o p
For machines. . . The meaning of the document is not defined. Machines cannot understand it. Wine is made from Grape We are defining the structure of document by XML but now the meaning of the structure is not defined. <Sentence> <Subject> Wine </Subject> <Verb> is made from </Verb> <Object> Grape </Object> </Sentence> XML document <Sentence> <Subject> Wine </Subject> <Verb> is made from </Verb> <Object> Grape </Object> </Sentence>
Ontology gives the meaning. . . Natural Language Document <Sentence> <Subject> Wine </Subject> <Verb> is made from </Verb> <Object> Grape </Object> </Sentence> Ontology
Why develop ontologies? p To share knowledge n p To reuse domain knowledge n p E. g. , geography ontology To make domain assumptions explicit n n p E. g. , using an ontology for integrating terminologies Facilitate knowledge management Enable new users to learn about the domain To distinguish domain knowledge from operational knowledge n e. g. , biblio metadata
What they are good for p Informal n Controlled vocabulary p n Upper-level structures for extending further p n E. g. , IRS information search Search p n E. g. , AGRIS/CARIS categorization Browsing support p n Beginnings of interoperability Limited query expansion disambiguation p e. g. , “Jordan” as a name of Basket-ball player and name of a country
What they are good for p Formal n Search p Concept-based query § User uses own words, language Related terms p Intelligent query expansion: “fishing vessels in China” expands to “fishing vessels in Asia” p n Consistency checking p n e. g. , “Goods” has a property called “price” that has a value restriction of number Interoperability support p Terms defined in expressive ontologies allow for mapping precisely how one term relates to another
Ontology Languages p Graphical notations n n p Semantic networks Topic maps UML RDF Logic based n n n Description Logics (e. g. , OIL, DAML+OIL, OWL) Rules (e. g. , Rule. ML, LP/Prolog) First Order Logic
Ontology Languages • • RDF(S) (Resource Description Framework (Schema)) OIL (Ontology Interchange Language) DAML+OIL (DARPA Agent Markup Language + OIL) OWL (Ontology Web Language) XOL (XML-based Ontology Exchange Language) SHOE (Simple HTML Ontology Extension) OML (Ontology Markup Language)
Object oriented model p Many languages use object oriented model: n Objects/Instances/Individuals p Elements of the domain of discourse p Equivalent to constants in FOL n Types/Classes/Concepts p Sets of objects sharing certain characteristics p Equivalent to unary predicates in FOL n Relations/Properties/Roles p Sets of pairs (tuples) of objects p Equivalent to binary predicates in FOL
OWL (Ontology Web Language) p OWL is now a W 3 C Recommendation p The purpose of OWL is identical to RDFS i. e. to provide an XML vocabulary to define classes, properties and their relationships. n n p RDFS enables us to express very rudimentary relationships and has limited inferencing capability. OWL enables us to express much richer relationships, thus yielding a much enhanced inferencing capability. The benefit of OWL is that it facilitates a much greater degree of inference than you get with RDF Schema.
Origins of OWL DARPA Agent Markup DAML Language EU/NSF Joint Ad hoc Committee A W 3 C Recommendation OIL Ontology Inference Layer RDF DAML+OIL OWL All influenced by RDF OWL Lite OWL DL OWL Full
OWL p OWL and RDF Schema enable rich machine-processable semantics RDFS OWL Semantics <rdfs: Class rdf: ID="River"> <rdfs: sub. Class. Of rdf: resource="#Stream"/> </rdfs: Class> RDF Schema XML/DTD/XML Schemas Syntax OWL <owl: Class rdf: ID="River"> <rdfs: sub. Class. Of rdf: resource="#Stream"/> </owl: Class>
Why Build on RDF p Provides basic ontological primitives n n Classes and relations (properties) Class (and property) hierarchy p Can exploit existing RDF infrastructure p Provides mechanism for using ontologies n n RDF triples assert facts about resources Use vocabulary from DAML+OIL ontologies
OWL Design Goals Shared ontologies p Ontology evolution p Ontology interoperability p Inconsistency detection p Expressivity vs. scalability p Ease of use p Compatibility with other standards p Internationalization p
Versions of OWL p Depending on the intended usage, OWL provides three increasingly expressive sublanguages OWL Full OWL DL OWL Lite Full: Very expressive, no computation guarantees DL (Description Logic): Maximum expressiveness, computationally complete Lite: Simple classification hierarchy with simple constraints.
Comparison of versions p Full: þ ý ý p We get the full power of the OWL language. It is very difficult to build a tool for this version. The user of a fully-compliant tool may not get a quick and complete answer. DL/Lite: þ þ ý Tools can be built more quickly and easily Users can expect responses from such tools to come quicker and be more complete. We don't have access to the full power of the language.
Describing classes in OWL vs. RDFS n OWL allows greater expressiveness Abstraction mechanism to group resources with similar characteristics p Much more powerful in describing constraints on relations between classes p Property transitivity, equivalence, symmetry, etc. p … p n Extensive support for reasoning
OWL Ontologies p What’s inside an OWL ontology n n n n p Classes + class-hierarchy Properties (Slots) / values Relations between classes (inheritance, disjoints, equivalents) Restrictions on properties (type, cardinality) Characteristics of properties (transitive, …) Annotations Individuals Reasoning tasks: classification, consistency checking
Classes p What is a Class? n n e. g. , person, pet, old a collection of individuals (object, things, . . . ) a way of describing part of the world an object in the world (OWL Full)
owl: Class Sub class of Class in RDF p Better to forget about classes of classes p Top-most class: owl: Thing p <owl: Class rdf: ID=“Person"/> <owl: Class rdf: ID=“Man"> <rdfs: sub. Class. Of rdf: resource="#Person" /> </owl: Class>
Individuals p Two equivalent declarations: 1. <Person rdf: ID=“Ganji" /> 1. <owl: Thing rdf: ID=“Ganji" /> <owl: Thing rdf: about="#Ganji"> <rdf: type rdf: resource="#Person"/> </owl: Thing>
Properties p What is a Property? n n e. g. , has_father, has_pet, service_number a collection of relationships between individuals (and data) a way of describing a kind of relationship between individuals an object in the world (OWL Full)
OWL Properties Object Properties Data type Properties Ana owns Cuba Ana age 25 Is range a literal / typed value ? then ERROR p XML Schema data types supported n DB people happy
Defining Properties p p p Object. Property Datatype. Property rdfs: sub. Property. Of rdfs: domain rdfs: range <owl: Object. Property rdf: ID="made. From. Grape"> <rdfs: domain rdf: resource="#Wine"/> <rdfs: range rdf: resource="#Wine. Grape"/> </owl: Object. Property>
Describing classes in OWL Complex Classes n Intersection of classes (owl: intersection. Of) p n Union of classes (owl: union. Of) p n OR (A B) AND (A B) Complement (owl: complement. Of) p NOT n Enumeration (owl: one. Of) n Disjoint Classes (owl: disjoint. With)
Describing classes in OWL Property Restrictions n n Defining a Class by restricting its possible instances via their property values OWL distinguishes between the following two: p Value constraint p Cardinality constraint
Describing classes in OWL Restrictions on Property Classes n Properties: p all. Values. From: rdfs: Class (lite/DL owl: Class) p has. Value: specific Individual p some. Values. From: rdfs: Class (lite/DL owl: Class) p min. Cardinality: xsd: non. Negative. Integer (in lite {0, 1}) p max. Cardinality: xsd: non. Negative. Integer (in lite {0, 1})
What’s in OWL, but not in RDF Ability to be distributed across many systems p Scalable to Web needs p Compatible with Web standards for: p n n p accessibility, and Internationalization Open and extensible
Describing properties in OWL vs. RDFS p RDF Schema provides some of predefined properties: n n p OWL provides additional predefined properties: n n n p rdfs: range used to indicate the range of values for a property. rdfs: domain used to associate a property with a class. rdfs: sub. Property. Of used to specialize a property. … owl: cardinality (indicate cardinality) owl: has. Value (at least one of the specified property values) … OWL provides additional property classes, which allow reasoning and inferencing: n n n owl: Functional. Property owl: Transitive. Property …
Describing properties in OWL Property Classes rdf: Property owl: Object. Property owl: Symmetric. Property p p owl: Datatype. Property owl: Functional. Property owl: Inverse. Functional. Property owl: Transitive. Property An Object. Property relates one Resource to another Resource. A Datatype. Property relates one Resource to a Literal - an XML Schema data type.
Transitivity of properties X p 1 Y Y p 1 Z implies X p 1 Z p Transitivity existed already in RDF n p “sub. Class. Of”, and ? ? ? e. g. located_in, part_of
Symmetric properties X p 1 Y implies X p 1 Y p e. g. , =
Functional Properties X p 1 Y X p 1 Z imply Z is the same as Y (they describe the same) What if Y, Z where explicitly defined as “different” ?
Inverse Functional Properties Y p 1 A Z p 1 A imply Z is the same as Y (they describe the same) What if Y, Z where explicitly defined as “different” ?
OWL distributed “equivalent class” “equivalent Property” Guitarra Internationalization standards ?
Complex Classes Female Student Professor n n n p Married Human Male Students Married Female Professors n Minority Students example n Married Female Students Divorced
Disjoint Classes p Married disjoint with: n n n Married Divorced Widowed Single Divorced p Widowed Single Are “Divorced” and “Single” disjoint ?
OWL Cardinality min Cardinality p max Cardinality p p “Cardinality” n p When min = max has Value n belongs to the class if it has the value
An Example OWL ontology <owl: Class rdf: ID=“Person” /> <owl: Class rdf: ID=“Man”> <rdfs: sub. Class. Of rdf: resource=“#Person” /> <owl: disjoint. With rdf: resource=“#Woman” /> </owl: Class> <owl: Class rdf: ID=“Woman”> <rdfs: sub. Class. Of rdf: resource=“#Person” /> <owl: disjoint. With rdf: resource=“#Man” /> </owl: Class> <owl: Class rdf: ID=“Father”> <rdfs: sub. Class. Of rdf: resource=“Man” /> <owl: Restriction owl: min. Cardinality="1"> <owl: on. Property rdf: resource="#has. Child" /> </owl: Restriction> </owl: Class> <owl: Object. Property rdf: ID=“has. Child"> <rdfs: domain rdf: resource="#Parent" /> <rdfs: range rdf: resource="#Person" /> </owl: Object. Property>
References http: //www. w 3. org/TR/owl-ref/ p Chapter 8 of the book p
The End
- Slides: 49