Semantic Web Technology - PowerPoint PPT Presentation

1 / 82
About This Presentation
Title:

Semantic Web Technology

Description:

www.apple.com. iphone. producer ... (http://www.apple.com, http://www. ... E.g., producer(Apple,iphone) RDF offers only binary predicates (properties) ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 83
Provided by: compHk
Category:

less

Transcript and Presenter's Notes

Title: Semantic Web Technology


1
Semantic Web Technology
  • COMP3150/4700 E-technology Architectures, Tools
    and Applications
  • (Fall 2007)

2
Lecture Outline
  • Basic Ideas of RDF
  • The Language of RDF
  • Basic Ideas of RDF Schema
  • ?he Language of RDF Schema
  • Basic Ideas of OWL
  • The Language of OWL

3
Lecture Outline
  • Basic Ideas of RDF
  • The Language of RDF
  • Basic Ideas of RDF Schema
  • ?he Language of RDF Schema
  • Basic Ideas of OWL
  • The Language of OWL

4
Why XML is not sufficient?
  • XML is a universal metalanguage for defining
    markup
  • However, XML does not provide any means of
    talking about the semantics (meaning) of data
  • E.g., there is no intended meaning associated
    with the nesting of tags
  • It is up to each application to interpret the
    nesting.

5
Nesting of Tags in XML
  • ipod
  • Apple
  • Opposite nesting, same information!
  • How to solve this ambiguity?

ipod is a product of Apple.
6
Basic Ideas of RDF
  • RDF Resource Description Framework
  • Basic building block (also called a statement)
    resource-property-value triple
  • RDF has been given a syntax in XML
  • This syntax inherits the benefits of XML

7
Resources
  • In RDF, everything is referred to as a resource
    (with a URI) which can be
  • a thing (e.g., book, person, etc.) or
  • a concept (e.g., ownership, role, etc.)
  • Recall that URI stands for Universal Resource
    Identifier that can be
  • a URL (Web address) or
  • some other kind of unique identifier

8
Properties
  • A special kind of resources, e.g.,
  • Peter (resource) Develop (property) Software
    Package ABC (value)
  • Develop (resource) type-of (property) IT Job
    (value)
  • Describe relations between resources
  • E.g. writtenBy, hasAge, hasTitle, etc.
  • Properties are also identified by URIs.

9
Statements
  • Statements assert the properties of resources
  • A statement is an resource-property-value triple
  • Values can be resources or literals
  • Literals are atomic values (strings)
  • E.g.,
  • Peter (resource) Develop (property) Software
    Package ABC (value)
  • Software Package ABC (resource) hasProgLang
    (property) Java (value)

10
Statements as Graphs
  • A directed graph with labeled nodes and arcs
  • from the resource (the subject of the statement)
  • to the value (the object of the statement)
  • Known in AI as a semantic net
  • The value of a statement may be a resource.

11
A Set of Triples as a Semantic Net
producer
iphone
www.apple.com
hasCEO
site-owner
Steve Grove
www.steve-grove-website.com
interest
Calligraphy
12
Statements as Triples
  • (http//www.apple.com,
  • http//www.williamshop.com/producer,
  • iphone)
  • The triple (x,P,y) can be considered as a logical
    formula P(x,y)
  • Binary predicate P relates x to y
  • E.g., producer(Apple,iphone)
  • RDF offers only binary predicates (properties)

13
Statements as XML Documents
  • Graphs are a powerful tool for human
    understanding but
  • The Semantic Web vision requires
    machine-accessible and machine-processable
    representations

14
Statements as XML Documents
  • xmlnsrdf"http//www.w3.org/1999/02/22-rdf-synta
    x-ns"
  • xmlnsws"http//www.williamshop.com/my-rdf-ns"
  • rdfabout"http//www.apple.com"
  • iphone

resource
property
value
15
Statements as XML Documents
  • An RDF document is represented by an XML element
    with the tag rdfRDF
  • The content of this element is a number of
    descriptions, which use rdfDescription tags.
  • Every description makes a statement about a
    resource, identified in 3 ways
  • an about attribute, referencing an existing
    resource
  • an ID attribute, creating a new resource
  • without a name, creating an anonymous resource

16
An RDF document is
  • Thus an RDF document can be viewed as
  • A set of triples
  • A graph (semantic net)
  • An XML document

17
Lecture Outline
  • Basic Ideas of RDF
  • The Language of RDF
  • Basic Ideas of RDF Schema
  • ?he Language of RDF Schema
  • Basic Ideas of OWL
  • The Language of OWL

18
XML-Based Syntax of RDF
  • An RDF document consists of an rdfRDF element
  • The content of that element is a number of
    descriptions
  • A namespace mechanism is used
  • Disambiguation
  • Namespaces are expected to be RDF documents
    defining resources that can be reused
  • Large, distributed collections of knowledge

19
Data Types
  • The attribute rdfdatatype"xsdinteger" is used
    to indicate the data type of the value of the age
    property (via a URI)
  • William Cheung
  • Associate Professor
  • 25

What if this is not a literal?
20
The rdfresource Attribute
  • E-Technology
  • William Cheung
  • Associate Professor

21
The rdfresource Attribute
  • The relationships between courses and lecturers
    (in the example) were not formally defined but
    existed implicitly through the use of the same
    name
  • The use of the same name may just be a
    coincidence for a machine
  • We can denote that two entities are the same
    using the rdfresource attribute

22
Nested Descriptions are allowed
  • E-Technology
  • William Cheung
  • Associate Professor

23
Adding rdftype Element/Property
  • - nscourse"/
  • E-Technology
  • bu- nsfaculty"/
  • William Cheung
  • Associate Professor

Instantiation!!
24
Abbreviated Syntax
  • Simplification rules
  • Childless property elements within description
    elements may be replaced by XML attributes
  • For description elements with a typing element we
    can use the name specified in the rdftype
    element instead of rdfDescription
  • These rules create syntactic variations of the
    same RDF statement
  • They are equivalent according to the RDF data
    model, although they have different XML syntax

25
Abbreviated Syntax Example
  • u- nscourse"/
  • E-Technology

E-Technology" w.hkbu.edu.hk/bu-nscourse"/ rdfresource"9231999"/
hnology"

26
Container Elements
  • Collect a number of resources or attributes about
    which we want to make statements as a whole
  • E.g., for courses taught by William Cheung

27
3 Types of Container Elements
  • rdfBag an unordered container, allowing multiple
    occurrences
  • E.g. students in a class
  • rdfSeq an ordered container, which may contain
    multiple occurrences
  • E.g. telephone directory (order is imposed)
  • rdfAlt a set of alternatives
  • E.g. allowable document formats (ps or pdf)

28
Example for a Bag
  • Cheung" butitle" Dr "

29
Lecture Outline
  • Basic Ideas of RDF
  • The Language of RDF
  • Basic Ideas of RDF Schema
  • ?he Language of RDF Schema
  • Basic Ideas of OWL
  • The Language of OWL

30
From RDF To RDF Schema
  • RDF
  • define vocabularies for describing resources
  • does not assume, nor does it define semantics of
    any particular application domain
  • RDF Schema (RDFS) - with semantics definition
    related to
  • Classes and Properties
  • Class Hierarchies and Inheritance
  • Property Hierarchies

31
Classes and their Instances
  • We must distinguish between
  • Concrete things (individual objects) in the
    domain E-Technology, William Cheung, etc.
  • Sets of individuals sharing properties called
    classes lecturers, courses etc.
  • Individual objects that belong to a class are
    referred to as instances of that class
  • The relationship between instances and classes in
    RDF is through rdftype

32
Nonsensical Statements Disallowed Through the Use
of Classes
  • E-Technology is taught by Web Intelligence
  • We want courses to be taught by lecturers only
  • Restriction on values of the property is taught
    by (range restriction)
  • RRS Building is taught by William Cheung
  • Only courses can be taught
  • This imposes a restriction on the objects to
    which the property can be applied (domain
    restriction)

33
Class Hierarchies
  • Classes can be organised in hierarchies using
    RDFS
  • A is a subclass of B if every instance of A is
    also an instance of B
  • Then B is a superclass of A

34
Inheritance Concept in Class Hierarchies
  • Range restriction Courses must be taught by
    academic staff members only
  • William Cheung is an Associate Professor.
  • He inherits the ability to teach from the class
    of academic staff members
  • This is done in RDF Schema by fixing the
    semantics of is a subclass of
  • It is not up to an application (RDF processing
    software) to interpret is a subclass of.

35
Property Hierarchies
  • Hierarchical relationships for properties
  • E.g., is taught by is a subproperty of
    involves
  • If a course C is taught by an academic staff
    member A, then C also involves ?
  • P is a subproperty of Q, if Q(x,y) is true
    whenever P(x,y) is true

36
RDF vs RDF Schema
37
Lecture Outline
  • Basic Ideas of RDF
  • The Language of RDF
  • Basic Ideas of RDF Schema
  • ?he Language of RDF Schema
  • Basic Ideas of OWL
  • The Language of OWL

38
RDF Schema in RDF
  • The modeling primitives of RDF Schema are defined
    using resources and properties (RDF itself is
    used!)
  • E.g., to declare that lecturer is a subclass of
    academic staff member
  • (subClassOf,lecturer,academicStaffMember)
  • XML-based syntax of RDF is used.

39
Core Classes and Properties
  • rdfsResource, the class of all resources
  • rdfsClass, the class of all classes
  • rdfsLiteral, the class of all literals (strings)
  • rdfProperty, the class of all properties.
  • rdfStatement, the class of all reified
    statements
  • rdftype, declares a resource an instance of a
    class
  • rdfssubClassOf, relates a class to its
    superclasses
  • rdfssubPropertyOf, relates a property to its
    superproperties
  • rdfsdomain, specifies the domain of a property
  • rdfsrange, specifies the range of a property

40
Examples
  • 2000/01/rdf-schemaLiteral"/

41
Relationships Between Core Classes and Properties
  • rdfssubClassOf and rdfssubPropertyOf are
    transitive, by definition (how about
    isMotherOf??)
  • rdfsClass is a subclass of rdfsResource
  • Because every class is a resource
  • rdfsResource is an instance of rdfsClass
  • rdfsResource is the class of all resources, so
    it is a class
  • Every class is an instance of rdfsClass
  • For the same reason

42
Subclass Hierarchy of Some Modeling Primitives of
RDF Schema

43
Instance Relationships of Some Core Properties of
RDF and RDF Schema

44
Reification and Containers
  • rdfsubject, relates a reified statement to its
    subject
  • rdfpredicate, relates a reified statement to its
    predicate
  • rdfobject, relates a reified statement to its
    object
  • rdfBag, the class of bags
  • rdfSeq, the class of sequences
  • rdfAlt, the class of alternatives
  • rdfsContainer, which is a superclass of all
    container classes, including the three above

45
Lecture Outline
  • Basic Ideas of RDF
  • The Language of RDF
  • Basic Ideas of RDF Schema
  • ?he Language of RDF Schema
  • Basic Ideas of OWL
  • The Language of OWL

46
Limitations of RDF Schema
  • Local scope of properties
  • rdfsrange defines the range of a property (e.g.
    eats) for resources of all classes
  • In RDF Schema we cannot declare range
    restrictions to properties that apply to
    resources of some classes only
  • E.g. we cannot say that cows eat only plants,
    while other animals may eat meat, too

47
Limitations of RDF Schema (2)
  • Disjointness of classes
  • Sometimes we wish to say that classes are
    disjoint (e.g. male and female)
  • Boolean combinations of classes
  • Sometimes we wish to build new classes by
    combining other classes using union,
    intersection, and complement
  • E.g. person is the disjoint union of the classes
    male and female

48
Limitations of RDF Schema (3)
  • Cardinality restrictions
  • E.g. a person has exactly two parents, a course
    is taught by at least one lecturer
  • Special characteristics of properties
  • Transitive property (like greater than)
  • Unique property (like is mother of)
  • A property is the inverse of another property
    (like eats and is eaten by)

49
Combining OWL with RDF Schema
  • Ideally, OWL extends RDF Schema
  • Consistent with the layered architecture of the
    Semantic Web
  • Simply extending RDF Schema
  • expressive power ? reasoning efficiency ?
  • Combining RDF Schema with logic leads to
    uncontrollable computational properties

50
Three Species of OWL
  • OWL Full
  • is fully upward-compatible with RDF, both
    syntactically and semantically
  • is so powerful that it is undecidable, thus no
    complete (or efficient) reasoning support
  • OWL DL
  • permits efficient reasoning support
  • lose full compatibility with RDF, ie., not every
    RDF doc. is a legal OWL DL doc.
  • OWL Lite
  • An even further restriction limits OWL DL to a
    subset of the language constructors

51
OWL Compatibility with RDF Schema
52
Lecture Outline
  • Basic Ideas of RDF
  • The Language of RDF
  • Basic Ideas of RDF Schema
  • ?he Language of RDF Schema
  • Basic Ideas of OWL
  • The Language of OWL

53
Classes
  • Classes are defined using owlClass
  • owlClass is a subclass of rdfsClass
  • Disjointness is defined using owldisjointWith
  • sor"/

54
Classes (2)
  • owlequivalentClass defines equivalence of
    classes
  • "academicStaffMember"/

55
Properties
  • In OWL there are two kinds of properties
  • Object properties, which relate objects to other
    objects
  • E.g. is-TaughtBy, supervises
  • Data type properties, which relate objects to
    datatype values
  • E.g. phone, title, age, etc.

56
Object Properties

57
Datatype Properties
  • 1/XLMSchema
  • nonNegativeInteger"/

58
Inverse Properties
  • "/

59
Equivalent Properties

60
Property Restrictions
  • In OWL we can declare that the class C satisfies
    certain conditions
  • All instances of C have certain properties taking
    certain values.
  • E.g., First year courses (a class) are taught by
    (property) processors (a class)
  • E.g., Tutorial sessions (a class) are taught by
    (property) teaching assistants (a class)
  • This is equivalent to saying that C is subclass
    of an anonymous class C', where C' collects all
    objects that satisfy the conditions.

61
Property Restrictions (2)
  • A (restriction) class is achieved through an
    owlRestriction element
  • This element contains an owlonProperty element
    and one or more restriction declarations
  • One type defines cardinality restrictions (at
    least one, at most 3,)

62
Property Restrictions (3)
  • The other type defines restrictions on the kinds
    of values the property may take
  • owlallValuesFrom specifies universal
    quantification
  • owlhasValue specifies a specific value
  • owlsomeValuesFrom specifies existential
    quantification

63
owlallValuesFrom
  • rdfresource"Professor"/

64
owlhasValue
  • "isTaughtBy"/
  • "9231999"/

65
owlsomeValuesFrom
  • "undergraduateCourse"/

66
Cardinality Restrictions
  • "isTaughtBy"/
  • "xsdnonNegativeInteger" 1

67
Special Properties
  • owlTransitiveProperty (transitive property)
  • E.g. has better grade than, is ancestor of
  • owlSymmetricProperty (symmetry)
  • E.g. has same grade as, is sibling of
  • owlFunctionalProperty defines a property that
    has at most one value for each object
  • E.g. age, height, directSupervisor
  • owlInverseFunctionalProperty defines a property
    for which two different objects cannot have the
    same value

68
Boolean Combinations
  • We can combine classes using Boolean operations
    (union, intersection, complement)
  • "staffMember"/

69
Boolean Combinations (2)
  • The new class is not a subclass of the union, but
    rather equal to the union
  • We have stated an equivalence of classes

70
Boolean Combinations (3)
  • t"/

71
Nesting of Boolean Operators
  • "/

72
No Unique-Names Assumption
  • OWL does not adopt the unique-names assumption of
    database systems
  • If two instances having a different name or ID
    does not imply that they are different
    individuals
  • Suppose we state that each course is taught by at
    most one staff member, and that a given course
    is taught by two staff members
  • An OWL reasoner does not flag an error
  • Instead it infers that the two staff members are
    identical

73
Distinct Objects
  • To ensure that different individuals are indeed
    recognized as such, we must explicitly assert
    their inequality

74
Distinct Objects (2)
  • OWL provides a shorthand notation to assert the
    pairwise inequality of all individuals in a given
    list

75
A Example - A Printer Ontology
76
A Printer Ontology - Beginning
  • xmlnsrdf"http//www.w3.org/1999/02/22-rdf-synta
    x-ns"
  • xmlnsrdfs"http//www.w3.org/2000/01/rdf-schema
    "
  • xmlnsxsd"http//www.w3.org/2001/XMLSchema"
  • xmlnsowl"http//www.w3.org/2002/07/owl"
  • xmlns"http//www.cs.vu.nl/frankh/spool/printer.
    owl"
  • My example version 1.2, 17 October 2002

77
A Printer Ontology Products and Devices
  • Products form a class.
  • Printing and digital imaging
    devices
  • form a subclass of products.
  • Device

78
A Printer Ontology HP Products
  • y"/

79
A Printer Ontology Printers and Personal
Printers
  • Printers are printing and digital
    imaging
  • devices.
  • Printers for personal use form
  • a subclass of printers.

80
A Printer Ontology HP LaserJet 1100se Printers
  • 1100se printers belong to the 1100
    series
  • and cost 450.

81
A Printer Ontology Properties


82
References
  • The Semantic Web Primer, MIT Press, 2004
Write a Comment
User Comments (0)
About PowerShow.com