Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ontology languages, XML and RDF. Contents Definition of ontology A quick survey to famous ontology languages Graphical Logic based ● XML ● XML, namespaces,

Similar presentations


Presentation on theme: "Ontology languages, XML and RDF. Contents Definition of ontology A quick survey to famous ontology languages Graphical Logic based ● XML ● XML, namespaces,"— Presentation transcript:

1 Ontology languages, XML and RDF

2 Contents Definition of ontology A quick survey to famous ontology languages Graphical Logic based ● XML ● XML, namespaces, XSLT ● XSLT, XSL:FO ● RDF

3 Ontology An ontology is a hierarchically structured set of terms for describing a domain that can be used as a skeletal foundation for a knowledge base. (Swartout, Patil, Knight, Russ) An ontology provides the means for describing explicitly the conceptualization behind the knowledge represented in a knowledge base. (Bernaras, Lasergoiti, Correra) An ontology is a formal, explicit specification of a shared conceptualization (Studer, Benjamins,Fensel)

4 (In)famous “Layer Cake”  Data Exchange  Semantics+reasoning  Relational Data ? ? ???

5 Ontology Languages Wide variety of languages for “Explicit Specification” –Graphical notations Semantic networks

6 Ontology Languages Wide variety of languages for “Explicit Specification” –Graphical notations Topic Maps

7 Ontology Languages Wide variety of languages for “Explicit Specification” –Graphical notations UML

8 Ontology Languages Wide variety of languages for “Explicit Specification” –Graphical notations RDF

9 Ontology Languages Wide variety of languages for “Explicit Specification” –Logic based Description Logics (e.g., OIL, DAML+OIL, OWL) Rules (e.g., RuleML, LP/Prolog) First Order Logic (e.g., KIF)

10 Ontology Languages Wide variety of languages for “Explicit Specification” –Logic based Conceptual graphs

11 Ontology Languages Wide variety of languages for “Explicit Specification” –Logic based Conceptual graphs (Syntactically) higher order logics (e.g., LBase) Non-classical logics (e.g., Flogic, Non-Mon, modalities) –Bayesian/probabilistic/fuzzy Degree of formality varies widely –Increased formality makes languages more amenable to machine processing (e.g., automated reasoning)

12 Objects/Instances/Individuals –Elements of the domain of discourse –Equivalent to constants in FOL Types/Classes/Concepts –Sets of objects sharing certain characteristics –Equivalent to unary predicates in FOL Relations/Properties/Roles –Sets of pairs (tuples) of objects –Equivalent to binary predicates in FOL Such languages are/can be: –Well understood –Formally specified –(Relatively) easy to use –Amenable to machine processing Many languages use “object oriented” model based on:

13 Web “Schema” Languages Existing Web languages extended to facilitate content description –XML  XML Schema (XMLS) –RDF  RDF Schema (RDFS) XMLS not an ontology language –Changes format of DTDs (document schemas) to be XML –Adds an extensible type hierarchy Integers, Strings, etc. Can define sub-types, e.g., positive integers RDFS is recognisable as an ontology language –Classes and properties –Sub/super-classes (and properties) –Range and domain (of properties)

14 XML –Unformal definition: –XML is a markup language for representation of –documents which contain stuctured information. Usages: Data exchange (e.g. RSS, SOAP-envelope, ad hoc B2B data exchange) Web services Data integration Content publishing (single source multiple output) Multimedia presentations (SMIL)

15 XML Processing –Parsing SAX: uses callback to notify occurences of each element(e.g. StartDocument(), startElement(), endDocument(), etc.) DOM: Makes and object model of the document in memory –Remote procedure call: XML-RPC –SOAP (web serices)

16 Namespaces in XML Namespaces avoids name conflicts same tag for different things same tag for different format Example: Document 1: Tim Berners Lee Document 2: Tim Berners Lee

17 Namespaces in XML (cont.) First try Tim Berners Lee Second try Tim Berners Lee Final solution Tim Berners Lee

18 Namespace example George Soros Counting........

19 XML Schema: What is a Schema ?  A schema defines the content of a number of XML-documents  It defines  which elements and attributes can be included  the element content  the order of elements  Schema substitutes DTD  Think of classes (schema) and instances (documents)

20 XML Schema  Schema is saved with postfix.xsd  A document is validated against a schema  A schema is a XML-document

21 XSL XSL consist of –formatting objects –XSL Transformations (XSLT) Formatting object: specifies presentation XSLT: Transformations to arbitrary format The idea of XSLT: traverse the tree and apply a specific template at each node Usage –XML to XML (i.e. SVG) –XML to (X)HTML –XML to text –XML to other formats (i.e CSV)

22 The XSLT language Transformation in XML dialect Example: A rule based language Output handled by the enviroment

23 Terminology Template rules consists of: –pattern –template Pattern specifies nodes a template applies to –tag name –attributes –context Template defines the transformations

24 XML Example chicken soup Introduction I’ve always.. book title section title para

25 Template rule for book

26 Template rule for section

27 Formatting objects Formatting represents common document elements Example –block –external-graphic –table –simple-link They are specified in XML Attributes specify their appearance

28 Template rule with objects

29 SMIL  SMIL  Synchronized Multimedia Integration Language  SMIL is an XML extension  used for multimedia presentations which integrate streaming audio and video with images, text, etc.  enables to specify what should be presented when

30 SMIL  Introduction  About XML  XML Schema  XML Namespaces  XSLT  Future

31 SMIL

32 RDF and RDFS RDF stands for Resource Description Framework It is a W3C candidate recommendation (http://www.w3.org/RDF) RDF is graphical formalism ( + XML syntax + semantics) –for representing metadata –for describing the semantics of information in a machine- accessible way RDFS extends RDF with “schema vocabulary”, e.g.: –Class, Property –type, subClassOf, subPropertyOf –range, domain

33 The RDF Data Model Statements are triples: Can be represented as a graph: Knuth StanfordU hasColleague Statements describe properties of resources A resource is any object that can be pointed to by a URI: –a document, a picture, a paragraph on the Web; –http://www.cs.man.ac.uk/index.html –a book in the library, a real person (?) –isbn://5031-4444-3333 –…–… Properties themselves are also resources (URIs)

34 URIs URI = Uniform Resource Identifier "The generic set of all names/addresses that are short strings that refer to resources" URLs (Uniform Resource Locators) are a particular type of URI, used for resources that can be accessed on the WWW (e.g., web pages) In RDF, URIs typically look like “normal” URLs, often with fragment identifiers to point at specific parts of a document: –http://www.somedomain.com/some/path/to/file#fragmentID

35 Linking Statements The subject of one statement can be the object of another Such collections of statements form a directed, labeled graph Note that the object of a triple can also be a “literal” (a string) Knuth STU hasColleague Carole http://www.stanford.edu hasColleague hasHomePage

36 How can RDF be implemented Usally RDF/XML syntax However other notations are possible –e.g. Notation3 "Sean"

37 RDF Syntax RDF has an XML syntax that has a specific meaning: Every Description element describes a resource Every attribute or nested element inside a Description is a property of that Resource We can refer to resources by using URIs http://www.stanford.edu/~Math

38 Rdf type RDF predifined property Its value – a resource that represent a category or class Its subject – Instance of that category or class prefix ex:, URI: http://www.example.org/terms

39 Rdf containers Bag: (A resource having type rdf:Bag) –Represents an unordered list of resources or literals –Duplicated values are prermitted Sequence: (A resource having type rdf:Seq) –Represents ordered list of resources or literal –Duplicated values are permitted Alternatives: (A resource having type rdf:Alt) –Represents group of resources or literals that are alternatives

40 Bag example

41 RDF reification association of a statement and a specific resource representing the statement used to make statements about statements Vocabulary: type rdf:Statement properties rdf:subject rdf:predicate rdf:object

42 Reification example The member of project opposed the statement that http://www.daml.org/projects/#11 is an NSF founded project http://www.daml.org/projects/#11

43 RDF graphs

44 RDF Schema (RDFS) RDF gives a formalism for meta data annotation, and a way to write it down in XML, but it does not give any special meaning to vocabulary such as subClassOf or type –Interpretation is an arbitrary binary relation RDF Schema allows you to define vocabulary terms and the relations between those terms –it gives “extra meaning” to particular RDF predicates and resources –this “extra meaning”, or semantics, specifies how a term should be interpreted

45 RDFS Examples RDF Schema terms (just a few examples): –Class –Property –type –subClassOf –range –domain These terms are the RDF Schema building blocks (constructors) used to create vocabularies:

46 RDFS is about creating taxonomies

47

48

49 Inferences: Yangtze is ariver Yangtze has a length of 6300 Kilometers Inferences in RDF and RDFS

50 Two classes same concept: –Equivalent classes: Airplane and Plane Cardinality constraints: –Ocean has one maxDepth Desire for more expressiveness

51 RDF/RDFS “Liberality” No distinction between classes and instances (individuals) Properties can themselves have properties No distinction between language constructors and ontology vocabulary, so constructors can be applied to themselves/each other

52 RDFS semantic using logic

53 Problems with RDFS RDFS too weak to describe resources in sufficient detail –No localised range and domain constraints Can’t say that the range of hasChild is person when applied to persons and elephant when applied to elephants –No existence/cardinality constraints Can’t say that all instances of person have a mother that is also a person, or that persons have exactly 2 parents –No transitive, inverse or symmetrical properties Can’t say that isPartOf is a transitive property, that hasPart is the inverse of isPartOf or that touches is symmetrical –…–… Difficult to provide reasoning support –No “native” reasoners for non-standard semantics –May be possible to reason via FO axiomatisation

54 RDF(S) tools Read RDF data –Parsers: Jena, Redland, SWI-Prolog –Validators: W3C RDF validation service –Editors: IsaViz, RDF Author, RDFEd, InferEd Store RDF data (XML format, tripples or relational/oo DB) –RSSDB, RDFLib Use RDF data (applications, RSS news, etc.) Manipulate RDF data (inference, query, etc.) –Jena RDQL, etc. –Example: SELECT ?person, ?knows WHERE (?x ?z),http://xmlns.com/foap/knows (?x ?person),http://xmlns.com/foap/name (?z ?knows)http://xmlns.com/foap/name

55 Web Ontology Language Requirements Desirable features identified for Web Ontology Language: Extends existing Web standards –Such as XML, RDF, RDFS Easy to understand and use –Should be based on familiar KR idioms Formally specified Of “adequate” expressive power Possible to provide automated reasoning support

56 From RDF to OWL Two languages developed to satisfy above requirements –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 Candidate Recommendation –Will soon become Proposed Recommendation

57 OWL Language Three species of OWL –OWL full is union of OWL syntax and RDF –OWL DL restricted to FOL fragment (¼ DAML+OIL) –OWL Lite is “easier to implement” subset of OWL DL Semantic layering –OWL DL ¼ OWL full within DL fragment –DL semantics officially definitive OWL DL based on SHIQ Description Logic –In fact it is equivalent to SHOIN (D n ) DL OWL DL Benefits from many years of DL research –Well defined semantics –Formal properties well understood (complexity, decidability) –Known reasoning algorithms –Implemented systems (highly optimised)

58 (In)famous “Layer Cake”  Data Exchange  Semantics+reasoning  Relational Data ? ? ??? Relationship between layers is not clear OWL DL extends “DL subset” of RDF


Download ppt "Ontology languages, XML and RDF. Contents Definition of ontology A quick survey to famous ontology languages Graphical Logic based ● XML ● XML, namespaces,"

Similar presentations


Ads by Google