1 / 35

RDF and XML tutorial

RDF and XML tutorial. Talk Overview. Semantic Web XML RDF DAML + OIL ( Time permitting). Problems with current search engines. Current search engines = keywords: high recall, low precision sensitive to vocabulary insensitive to implicit content. Search engines on the Semantic Web .

issac
Download Presentation

RDF and XML tutorial

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. RDF and XML tutorial

  2. Talk Overview • Semantic Web • XML • RDF • DAML + OIL ( Time permitting)

  3. Problems with current search engines • Current search engines = keywords: • high recall, low precision • sensitive to vocabulary • insensitive to implicit content

  4. Search engines on theSemantic Web • concept search instead of keyword search • semantic narrowing/widening of queries • query-answering over >1 document • document transformation operators

  5. So what is the Semantic Web? • The “Semantic Web Wedding Cake” • Crash course • XML • RDF • RDF Schema • DAML+OIL (OWL)

  6. TBL talk at XML 2000

  7. XML: User definable and domain specific markup HTML: <H1>Introduction to AI</H1><UL> <LI>Teacher: Frank van Harmelen<LI>Students: 1AI, 1I<LI>Requirements: none</UL> XML: <course><title>Introduction to AI</title><teacher>Frank van Harmelen</teacher><students>1AI, 1I</students><req>none</req></course>

  8. course title teacher students name http XML: document = labelled tree • node = label + attr/values + contents <course date=“...”><title>...</title><teacher>...</teacher> <name>...</name> <http>...</http><students>...</students></course> = • XML Schema: grammars for describing legal trees and datatypes • So:why not use XML to represent semantics?

  9. Syntax versus Semantics • Syntax: the structure of your data • Semantics: the meaning of your data • Two conditions necessary for interoperability: • Adopt a common syntax: this enables applications to parse the data. • Adopt a means for understanding the semantics: this enables applications to use the data.

  10. XML and Semantics? <Predator> … </Predator> • Predator: a medium-altitude, long-endurance unmanned aerial vehicle system. • Predator : one that victimizes, plunders, or destroys, especially for one's own gain. • Predator : an organism that lives by preying on other organisms. • Predator: a company which specializes in camouflage attire.

  11. XML: limitations for semantic markup • XML makes no commitment on:  Domain-specific ontological vocabulary  Ontological modeling primitives • Requires pre-arranged agreement on  &  • Only feasible for closed collaboration • agents in a small & stable community • pages on a small & stable intranet • Not suited for sharing Web-resources

  12. What is RDF ? • RDF is a data model • the model is domain-neutral, application-neutral and ready for internationalization (i18n) • the model can be viewed as directed, labeled graphs or as an object-oriented model (object/attribute/value) • RDF data model is an abstract, conceptual layer independent of XML • consequently, XML is a transfer syntax for RDF, not a component of RDF • RDF data might never occur in XML form

  13. value resource property http://www.w3.org/TR/REC-rdf-syntax/ author “Ora Lassila” RDF model • RDF “statements” consist of resources (= nodes)which have propertieswhich have values (= nodes,strings) = subject= predicate= object “http://www.w3.org/TR/REC-rdf-syntax/ has the author Ora Lassila”

  14. RDF Model Example “W3C” dc:Publisher http://www.w3.org/TR/REC-rdf-syntax/ dc:Creator dc:Date “Ora Lassila” “1999-02-22”

  15. http://www.w3.org/TR/REC-rdf-syntax/ dc:Creator “Ora Lassila” p:Name p:EMail “ora.lassila@nokia.com” Complex values • So far, values of properties have been strings • A graph node (corresponding to a resource) also can be the value of a property • arbitrarily complex tree and graph structures are possible • syntactically, values can be embedded (i.e. lexically in-line) or referenced (linked) • Example:

  16. http://www.w3.org/TR/REC-rdf-syntax/ dc:Creator “Ora Lassila” p:Name p:EMail “ora.lassila@nokia.com” Complex values (continued) • Corresponding triples { “http://www.w3.org/TR/PR-rdf-syntax/”, dc:Creator, x } { x, p:Name, “Ora Lassila” } { x, p:EMail, “ora.lassila@nokia.com” }

  17. Containers • Containers are collections • they allow grouping of resources (or literal values) • It is possible to make statements about the container (as a whole) or about its members individually • Different types of containers exist • bag - unordered collection • seq - ordered collection (= “sequence”) • alt - represents alternatives • It is also possible to create collections based on URI patterns • for example, all files in a particular web site • Duplicate values are permitted • there is no mechanism to enforce unique value constraints

  18. http://www.w3.org/TR/REC-rdf-syntax dc:Creator rdf:Type rdf:Seq rdf:_1 rdf:_2 “Ora Lassila” “Ralph Swick” Containers (continued)

  19. Higher-order statements • One can make RDF statements about other RDF statements • example: “Ralph believes that the web contains one billion documents” • Higher-order statements • allow us to express beliefs (and other modalities) • are important for trust models, digital signatures,etc. • also: metadata about metadata • are represented by modeling RDF in RDF itself

  20. dc:Creator http://www.w3.org/TR/REC-rdf-syntax “Ora Lassila” dc:Creator “Library of Congress” Reification • RDF is not really second-order • But it does provide a built-in predicate vocabulary for reification • The dotted box corresponds to the following statements • { x,rdf:predicate, “dc:creator” } • { x, rdf:subject, “http://www.w3.org/TR/RED-rdf-syntax } • { x, rdf:object, “Ora Lassila” } • { x, rdf:type, “rdf:statement” }

  21. <rdf:Description rdf:about=“#NYT”> <claims> <rdf:Description rdf:about=“#pers05”> <authorOf>ISBN...</authorOf> </rdf:Description> </claims> </rdf:Description> Author-of pers05 ISBN... Reification • Any statement can be an object graphs can be nested - reification claims NYT

  22. RDF Schema • Defines small vocabulary for RDF: • Class, subClassOf, type • Property, subPropertyOf • domain, range • Vocabulary can be used to define other vocabularies for your application domain Person subClassOf subClassOf range domain Student Researcher hasSuperVisor type type Frank Jeen hasSuperVisor

  23. RDF Schema syntax in XML <rdf:Description ID="MotorVehicle"> <rdf:type resource="http://www.w3.org/...#Class"/> <rdfs:subClassOf rdf:resource="http://www.w3.org/...#Resource"/> </rdf:Description> <rdf:Description ID="Truck"> <rdf:type resource="http://www.w3.org/...#Class"/> <rdfs:subClassOf rdf:resource="#MotorVehicle"/> </rdf:Description> <rdf:Description ID="registeredTo"> <rdf:type resource="http://www.w3.org/...#Property"/> <rdfs:domain rdf:resource="#MotorVehicle"/> <rdfs:range rdf:resource="#Person"/> </rdf:Description> <rdf:Description ID=”ownedBy"> <rdf:type resource="http://www.w3.org/...#Property"/> <rdfs:subPropertyOf rdf:resource="#registeredTo"/> </rdf:Description>

  24. Conclusions about RDF(S) ? • Next step up from plain XML • (small) ontological commitment to modeling primitives • possible to define vocabulary • However: • no precisely described meaning • no inference model

  25. Beyond RDF: OIL & DAML • OIL extends RDF Schema to a fully-fledged knowledge representation language. • logical expressions • data-typing • cardinality • quantifiers • http://www.ontoknowledge.org • DAML = US sister of OIL • Merged as DAML+OIL in 2001 • Becomes OWL W3C standard in March '03

  26. DAML+OIL (by example) class-def animal % animals are a class class-def plant % plants are a class subclass-of NOT animal% that is disjoint from animals class-def tree subclass-of plant % trees are a type of plants class-def branch slot-constraint is-part-of % branches are parts of some tree has-valuetree max-cardinality 1 class-def defined carnivore % carnivores are animals subclass-of animal slot-constraint eats % that eat any other animals value-typeanimal class-def defined herbivore % herbivores are animals subclass-of animal, NOT carnivore % that are not carnivores, and slot-constraint eats % they eat plants or parts of plants value-type plant OR (slot-constraint is-part-of has-value plant)

  27. DAML+OIL as RDFS extension RDF(S) DAML+OIL • class-def • subclass-of • slot-def • subslot-of • domain • range • class-expressions • AND, OR, NOT • slot-constraints • has-value, value-type • cardinality • slot-properties • trans, symm

  28.  ! DAML+OIL: Classes <daml:Class rdf:ID="Male"> <rdfs:subClassOf rdf:resource="#Animal"/> </daml:Class> <daml:Class rdf:ID="Female"> <rdfs:subClassOf rdf:resource="#Animal"/> <daml:disjointWith rdf:resource="#Male"/> </daml:Class> <daml:Class rdf:ID="Man"> <rdfs:subClassOf rdf:resource="#Person"/> <rdfs:subClassOf rdf:resource="#Male"/> </daml:Class>

  29. Class-Building Operations • Relation to other Classes • rdfs:subClassOf • daml:disjointWith • daml:disjointUnionOf • daml:sameClassAs • daml:equivalentTo • Contained Elements: • daml:oneOf • Boolean combinations: • daml:intersectionOf • daml:unionOf • daml:complementOf

  30. DAML+OIL: Properties <daml:ObjectProperty rdf:ID="hasParent"> <rdfs:domain rdf:resource="#Animal"/> <rdfs:range rdf:resource="#Animal"/> </daml:ObjectProperty> <daml:ObjectProperty rdf:ID="hasChild"> <daml:inverseOf rdf:resource="#hasParent"/> </daml:ObjectProperty> <daml:UniqueProperty rdf:ID="hasMother"> <rdfs:subPropertyOf rdf:resource="#hasParent"/> <rdfs:range rdf:resource="#Female"/> </daml:UniqueProperty>

  31. Property-Building Operations • Basic Types • daml:ObjectProperty • daml:DataTypeProperty • Special Types • daml:TransitiveProperty • daml:UniqueProperty • daml:UnambigousProperty • Further Restrictions • rdfs:subPropertyOf • rdfs:domain • rdfs:range • daml:samePropertyAs • daml:inverseOf

  32. DAML+OIL:Property Restrictions <daml:Class rdf:ID="Person"> <rdfs:subClassOf rdf:resource="#Animal"/> <rdfs:subClassOf> <daml:Restriction> <daml:onProperty rdf:resource="#hasFather"/> <daml:toClass rdf:resource="#Man"/> </daml:Restriction> <daml:Restriction daml:cardinality="1"> <daml:onProperty rdf:resource="#hasFather"/> </daml:Restriction> </rdfs:subClassOf> </daml:Class>

  33. DAML+OIL:Property Restrictions <daml:Class rdf:ID="Person"> <rdfs:subClassOf rdf:resource="#Animal"/> <rdfs:subClassOf> <daml:Restriction daml:cardinalityQ="1"> <daml:onProperty rdf:resource="#hasFather"/> <daml:hasClassQ rdf:resource="#Man"/> </daml:Restriction> </rdfs:subClassOf> </daml:Class>

  34. Number Restrictions daml:cardinality daml:maxCardinality daml:minCardinality Restrictions • General • daml:Restriction • daml:onProperty • Value and Type Restrictions • daml:toClass • daml:hasValue • daml:hasClass • Combinations • daml:cardinalityQ • daml:maxCardinalityQ • daml:minCardinalityQ

  35. Resources • homepages.cwi.nl/~lynda/spool/sw-tue-2003.ppt • www.daml.org/meetings/2003/05/SWMU/briefings/ 07_1045_Essential_Building_Blocks.ppt • www.ltg.ed.ac.uk/~ht/ora-rdf-dagstuhl.ppt

More Related