Transcript Document
TOWARDS THE SEMANTIC WEB: Ontology-driven Knowledge Management OIL and DAML+OIL: Ontology Languages for the Semantic Web 2005. 1. 10. Sungshin Lim [email protected] Artificial Intelligence Laboratory, Pusan National University Contents The Semantic Web Pyramid of Languages XML for Data Exchange Resource Description Framework (RDF) RDF Schema Ontology Inference Layer (OIL) DAML+OIL Web Ontology Language (OWL) [email protected] Page 2 The Semantic Web Pyramid of Languages [email protected] Page 3 XML for Data Exchange XML is designed for mark-up in documents of arbitrary structure XML provides a standardized syntactical way to expose structural information DTD defines a grammar to specify allowable combinations and nesting of tag names, attribute names, and so on. Although XML Schema offers several advantages over DTDs, their role is essentially the same. XML is used to server a range of purposes: – Serialization syntax for other mark-up languages • e.g. Synchronized Multimedia Integration Language (SMIL) – Separating form from content • E.g. XSL – Uniform data-exchange format [email protected] Page 4 Resource Description Framework (RDF) RDF – is designed to standardize the definition – use of meta-data descriptions of web-based resource – is suited to representing data Basic building block – object–attribute-value – A(O,V) – [O] – A ->[V] Subject predicate Object Equivalent! Resource [email protected] property Value Page 5 RDF: Why do we need RDF? Sungshin Lim is the creator of the resource “http://klpl.re.pusan.ac.kr/page.html“. What is the correct way of expressing it? <document href=”http://klpl.re. pusan.ac.kr/page.html”> <creator>Sungshin Lim</creator> </document> <creator> <fistName>Sungshin</fistName> <lastName>Lim</lastName> <documents> <uri>http://klpl.re.pusan. ac.kr/page.html</uri> </documents> </creator> <creator> <name>Sungshin Lim</name> <uri>http://klpl.re.pusan. ac.kr/page.html</uri> </creator> [email protected] Page 6 RDF: The RDF Data Model In RDF this sentence would be a triple: triple(page.html,creator,Sungshin Lim) creator(page.html,Sungshin Lim) page.html creator “Sungshin Lim“ Resource Property Value (subject) (predicate) (object) object attribute value [email protected] Page 7 RDF: The RDF Data Model page.html creator “Sungshin Lim“ <rdf:RDF xmlns:rdf = “http://www.w3.org/1999/02/22-rdf-syntax-ns#” xmlns:dc = “http://http://purl.org/dc/elements/1.1/”> <rdf:Description rdf:about = “http://klpl.re.pusan.ac.kr/page.html”> <dc:creator>Sungshin Lim</dc:creator> </rdf:Description> </rdf:RDF> [email protected] Page 8 Tutorial: RDF Namespace http://www.w3.org/1999/02/22-rdf-syntax-ns# ID about type resource Description [email protected] Page 9 Tutorial: RDF Model (graph) Legend: Ellipse indicates "Resource" Rectangle indicates "literal string value" [email protected] Page 10 Tutorial: rdf:Description + rdf:type <?xml version="1.0"?> <rdf:Description rdf:about="http://www.china.org/geography/rivers#Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/river#"> <rdf:type rdf:resource="http://www.geodesy.org/river#River"/> <length>6300 kilometers</length> <startingLocation>western China's Qinghai-Tibet Plateau</startingLocation> <endingLocation>East China Sea</endingLocation> </rdf:Description> This is read as: This is a Description about the resource http://www.china.org/geography/rivers#Yangtze. This resource is an instance of the River type (class). The http://www.china.org/geography/rivers#Yangtze resource has a length of 6300 kilometers, a startingLocation of western China's Qinghai-Tibet Plateau, and an endingLocation of the East China Sea." [email protected] Page 11 Tutorial: Alternative Alternatively we can use rdf:ID rather than rdf:about, as shown here: <?xml version="1.0"?> <rdf:Description rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/river#" xml:base="http://www.china.org/geography/rivers"> <rdf:type rdf:resource="http://www.geodesy.org/river#River"/> <length>6300 kilometers</length> <startingLocation>western China's Qinghai-Tibet Plateau</startingLocation> <endingLocation>East China Sea</endingLocation> </rdf:Description> [email protected] Page 12 RDF Schema RDFS extends RDF with “schema vocabulary”, e.g.: – Class, Property – type, subClassOf, subPropertyOf – range, domain RDF Schema for Simple Ontologies <rdfs:Class ref:about=“Book”/> <rdfs:Class ref:about=“HardCover”/> <rdfs:subClassOf ref:resource=“#Book”/> </rdfs:Class> <rdfs:Property rdf:about=“hasPrice”> <rdfs:domain rdf:resource=“#Book”/> </rdfs:Property> [email protected] Page 13 RDFS: Core Classes and Properties rdfs:Resource Core Classes rdfs:Literal rdfs:XMLLiteral rdfs:Class rdf:Property rdfs:DataType Core Properties rdfs:Type rdfs:SubClassOf rdfs:SubPropertyOf rdfs:Domain rdfs:Range rdfs:Label rdfs:Comment [email protected] Page 14 RDFS: Example A Vehicle Class Hierarchy This schema could also be described by the triples: ex:MotorVehicle ex:PassengerVehicle ex:Van ex:Truck ex:MiniVan rdf:type rdf:type rdf:type rdf:type rdf:type rdfs:Class rdfs:Class rdfs:Class rdfs:Class rdfs:Class ex:PassengerVehicle ex:Van ex:Truck rdfs:subClassOf rdfs:subClassOf rdfs:subClassOf ex:MotorVehicle . ex:MotorVehicle . ex:MotorVehicle . ex:MiniVan ex:MiniVan rdfs:subClassOf rdfs:subClassOf ex:Van . ex:PassengerVehicle . [email protected] . . . . . Page 15 RDFS: Example <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://example.org/schemas/vehicles"> <rdf:Description rdf:ID="MotorVehicle"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> </rdf:Description> The Vehicle Class Hierarchy in RDF <rdf:Description rdf:ID="PassengerVehicle"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/> </rdf:Description> <rdf:Description rdf:ID="Truck"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/> </rdf:Description> <rdf:Description rdf:ID="Van"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/> </rdf:Description> <rdf:Description rdf:ID="MiniVan"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#Van"/> <rdfs:subClassOf rdf:resource="#PassengerVehicle"/> </rdf:Description> </rdf:RDF> [email protected] Page 16 RDFS: Example <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://example.org/schemas/vehicles"> <rdfs:Class rdf:ID="MotorVehicle"/> <rdfs:Class rdf:ID="PassengerVehicle"> <rdfs:subClassOf rdf:resource="#MotorVehicle"/> </rdfs:Class> The Vehicle Class Hierarchy Using the Typed Node Abbreviation <rdfs:Class rdf:ID="Truck"> <rdfs:subClassOf rdf:resource="#MotorVehicle"/> </rdfs:Class> <rdfs:Class rdf:ID="Van"> <rdfs:subClassOf rdf:resource="#MotorVehicle"/> </rdfs:Class> <rdfs:Class rdf:ID="MiniVan"> <rdfs:subClassOf rdf:resource="#Van"/> <rdfs:subClassOf rdf:resource="#PassengerVehicle"/> </rdfs:Class> </rdf:RDF> [email protected] Page 17 Ontology Inference Layer (OIL) Ontology Inference Layer or Ontology Interchange Language a Web-based representation and inference layer for ontologies uses frame-based systems, description logics, and Web standards Frame-based Systems – Classes (frames) with properties (attributes, slots) Description Logics – describe knowledge in terms of concepts and role restrictions Web Standards: XML and RDF – extension of RDF and RDF Schema – compatible with RDF Schema (RDFS), and includes a precise semantics for describing term meanings [email protected] Page 18 Capabilities of OIL Support hierarchies of classes and properties – based on subclass and subproperty relations Allow classes to be built from other classes – using combinations of intersection (AND), union (OR), and complement (NOT) Allow the domain, range, and cardinality of properties to be restricted Support transitive and inverse properties Support concrete data types – integers, strings, etc. [email protected] Page 19 Example: OIL Ontology [email protected] Page 20 DARPA Agent Markup Language + OIL (DAML+OIL) Two languages developed to satisfy above requirements – OIL: developed by group of (largely) European researchers (several from OntoKnowledge project) – DAML-ONT: developed by group of (largely) US researchers (in DARPA DAML programme) Efforts merged to produce DAML+OIL – Development was overseen by joint EU/US committee DAML+OIL – a semantic markup language for Web resources – builds on earlier W3C standards such as RDF and RDF Schema, and extends these languages with richer modeling primitives – provides modeling primitives commonly found in frame-based languages – A DAML+OIL ontology consists of headers, class elements, property elements, and instances OWL (Web Ontology Language) [email protected] Page 21 DAML+Oil example: Namespace, Header Namespace Header – Version information – Comments – Imports [email protected] Page 22 DAML+Oil example: Class Defining Classes – In order to describe objects, it is useful to define some basic types. This is done by giving a name for a class, which is the subset of the universe which contains all objects of that type. subClassOf [email protected] Multiple superclasses Page 23 DAML+Oil example: Property Object properties Datatype properties [email protected] Page 24 DAML+Oil example: Property Restrictions Restriction defines an anonymous class, namely the class of all things that satisfy the restriction. [email protected] Page 25 DAML+Oil example: Addition to Existing Class If we want to add to a defined class, we need not modify previous statement, but we can simply add a class description: [email protected] Page 26 DAML+Oil example: Notations for Properties UniqueProperty inverseOf TransitiveProperty samePropertyAs [email protected] Page 27 DAML+Oil example: Notations for Classes complementOf disjointUnionOf intersectionOf sameClassAs [email protected] Page 28 DAML+Oil example: Defining Individuals [email protected] Page 29 The semantic web pyramid of languages Semantics+reasoning Relational Data Data Exchange [email protected] Page 30 From RDF to OWL Two languages developed by extending (part of) RDF – OIL: developed by group of (largely) European researchers (several from EU OntoKnowledge project) – DAML-ONT: developed by group of (largely) US researchers (in DARPA DAML programme) Efforts merged to produce DAML+OIL – Development was carried out by “Joint EU/US Committee on Agent Markup Languages” – Extends (“DL subset” of) RDF DAML+OIL submitted to W3C as basis for standardisation – Web-Ontology (WebOnt) Working Group formed – WebOnt group developed OWL language based on DAML+OIL – OWL language now a W3C Recommendation [email protected] Page 31 Web Ontology Language (OWL) OWL is now a W3C Recommendation The purpose of OWL is identical to RDFS i.e. to provide an XML vocabulary to define classes, properties and their relationships. – 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 inferencing than you get with RDF Schema. [email protected] Page 32 Origins of OWL DARPA Agent Markup DAML Language EU/NSF Joint Ad hoc Committee A W3C Recommendation [email protected] OIL Ontology Inference Layer RDF DAML+OIL OWL All influenced by RDF OWL Lite OWL DL OWL Full Page 33 OWL OWL and RDF Schema enable rich machine-processable semantics RDFS OWL Semantics <rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </rdfs:Class> RDF Schema XML/DTD/XML Schemas Syntax OWL <owl:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </owl:Class> [email protected] Page 34