CS代写 MZH5760 is taught by – cscodehelp代写

A Discussion of Some Intuitions of Defeasible Reasoning

RDF (Continued)

Copyright By cscodehelp代写 加微信 cscodehelp

Frank van Harmelen
https://www.w3.org/RDF
https://www.w3schools.com/xml/xml_rdf.asp

A Semantic Web Primer

A Semantic Web Primer
Lecture Outline
Basic Concepts of RDF Schema
Τhe Language of RDF Schema
Axiomatic Semantics for RDF and RDFS
Direct Semantics based on Inference Rules

A Semantic Web Primer
Basic Ideas of RDF Schema
RDF is a universal language that lets users describe resources in their own vocabularies
RDF does not assume, nor does it define semantics of any particular application domain
The user can do so in RDF Schema using:
Classes and Properties
Class Hierarchies and Inheritance
Property Hierarchies

A Semantic Web Primer
Classes and their Instances
We must distinguish between
Concrete “things” (individual objects) in the domain: Discrete Maths, etc.
Sets of individuals sharing properties called classes: lecturers, students, 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 rdf:type

A Semantic Web Primer
Why Classes are Useful
Impose restrictions on what can be stated in an RDF document using the schema
As in programming languages
E.g. A+1, where A is an array
Disallow nonsense from being stated

A Semantic Web Primer
Nonsensical Statements disallowed through the Use of Classes
Discrete Maths is taught by Concrete Maths
We want courses to be taught by lecturers only
Restriction on values of the property “is taught by” (range restriction)

Room MZH5760 is taught by
Only courses can be taught
This imposes a restriction on the objects to which the property can be applied (domain restriction)

A Semantic Web Primer
Class Hierarchies
Classes can be organised in hierarchies
A is a subclass of B if every instance of A is also an instance of B
Then B is a superclass of A
A subclass graph does not have to be a tree
A class may have multiple superclasses

A Semantic Web Primer
Class Hierarchy Example

A Semantic Web Primer
Inheritance in Class Hierarchies
Range restriction: Courses must be taught by academic staff members only
is a 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”

A Semantic Web Primer
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 Α
The converse is not necessarily true
E.g., A may be the teacher of the course C, or
a tutor who marks student homework but does not teach C
P is a subproperty of Q, if Q(x,y) is true whenever P(x,y) is true. Hence in the above example, “is taught by” is subproerty of “involve”

A Semantic Web Primer
RDF Layer vs RDF Schema Layer
Discrete Mathematics is taught by
The schema is itself written in a formal language, RDF Schema, that can express its ingredients:
subClassOf, Class, Property, subPropertyOf, Resource, etc.

A Semantic Web Primer
RDF Layer vs RDF Schema Layer (2)

RDF vs RDFS

A Semantic Web Primer
Lecture Outline
Basic Concepts of RDF Schema
Τhe Language of RDF Schema
Axiomatic Semantics for RDF and RDFS
Direct Semantics based on Inference Rules

A Semantic Web Primer
RDF Schema in RDF
The modeling primitives of RDF Schema are defined using resources and properties (RDF itself is used!)
To declare that “lecturer” is a subclass of “academic staff member”
Define resources lecturer, academicStaffMember, and subClassOf
define property subClassOf
Write triple (lecturer,subClassOf,academicStaffMember)
We use the XML-based syntax of RDF

A Semantic Web Primer
Core Classes
rdfs:Resource, the class of all resources
rdfs:Class, the class of all classes
rdfs:Literal, the class of all literals (strings)
rdf:Property, the class of all properties.
rdf:Statement, the class of all reified statements

A Semantic Web Primer
Core Properties
rdf:type, which relates a resource to its class
The resource is declared to be an instance of that class
rdfs:subClassOf, which relates a class to one of its superclasses
All instances of a class are instances of its superclass
rdfs:subPropertyOf, relates a property to one of its superproperties

A Semantic Web Primer
Core Properties (2)
rdfs:domain, which specifies the domain of a property P
The class of those resources that may appear as subjects in a triple with predicate P
If the domain is not specified, then any resource can be the subject
rdfs:range, which specifies the range of a property P
The class of those resources that may appear as values in a triple with predicate P

A Semantic Web Primer






A Semantic Web Primer
Relationships Between Core Classes and Properties
rdfs:subClassOf and rdfs:subPropertyOf are transitive, by definition
rdfs:Class is a subclass of rdfs:Resource
Because every class is a resource
rdfs:Resource is an instance of rdfs:Class
Because rdfs:Resource is the class of all resources, so it is a class
Every class is an instance of rdfs:Class
For the same reason

A Semantic Web Primer
Reification and Containers
rdf:subject, relates a reified statement to its subject
rdf:predicate, relates a reified statement to its predicate
rdf:object, relates a reified statement to its object
rdf:Bag, the class of bags
rdf:Seq, the class of sequences
rdf:Alt, the class of alternatives
rdfs:Container, which is a superclass of all container classes, including the three above

A Semantic Web Primer
Utility Properties
rdfs:seeAlso relates a resource to another resource that explains it
rdfs:isDefinedBy is a subproperty of rdfs:seeAlso and relates a resource to the place where its definition, typically an RDF schema.
rdfs:comment. Comments, typically longer text, can be associated with a resource
rdfs:label. A human-friendly label (name) is associated with a resource

A Semantic Web Primer
Example: A University


The class of lecturers. All lecturers are academic staff members.


Note to the role of TWO Simplification rules mentioned in previous lectures:
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 rdf:type element instead of rdf:Description

A Semantic Web Primer
Example: A University (2)

The class of courses



Inherits its domain (“course”) and range (“lecturer”)
from its superproperty “involves”


A Semantic Web Primer
Example: A University (3)


It is a property of staff members
and takes literals as values.



A Semantic Web Primer
Class Hierarchy for the Motor Vehicles Example

A Semantic Web Primer

Leave a Reply

Your email address will not be published. Required fields are marked *