Uploaded by Hazam Hazam

exam-may-2010-questions-midsummer-examinations

advertisement
lOMoARcPSD|24245766
Exam May 2010, Questions - Midsummer Examinations
Semantic Web (University of Leicester)
Studocu is not sponsored or endorsed by any college or university
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
lOMoARcPSD|24245766
CO7216
No. of Pages:
MIDSUMMER EXAMINATIONS 2010
Subject
C OMPUTER S CIENCE
Title of paper
CO7216 — S EMANTIC W EB
Time allowed
Two hours
No. of Questions:
8
3
Instructions to candidates
This paper contains three questions.
Any number of questions may be attempted, but only the best two answers will be
taken into account. Full marks may be obtained for answers to two questions.
All questions carry equal weight. (30 marks per question).
Calculators are not allowed.
The exam is worth 60% of the total module mark.
All relevant namespaces have been provided in the helper sheet.
Continued . . .
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
lOMoARcPSD|24245766
2
CO7216
Question 1.
(a) List two technologies that can be used to add semantics to existing web documents developed using HTML and XHTML.
[2 marks]
(b) Explain briefly three benefits of using Microformats
[3 marks]
(c) Consider the following HTML code.
<div>
<p>
Gordon Brown
< / p>
<p>
E m a i l : <a h r e f = " mailto:gbrown@number10 . com " >
gb@number10 . com< / a>
< / p>
</ div>
Markup the HTML code in RDFa using the following properties defined in the foaf namespace: foaf:Person, foaf:name, foaf:mbox
[3 marks]
(d) Illustrate and explain in detail the three components of the upper level ontology for a service, provided by OWL-S. A figure may be used
[5 marks]
Consider an online card making and delivering service which allows registered users to make
cards online and delivers them for a fee. Users can search for cards for different occasions,
customise them and finally get them printed and delivered. The service provides facilities to view
or change different attributes of the cards such as fonts, background colour and images. Some
of the atomic processes supported by the service are:
• Change card attributes: allows users to change various features of the card such as images, text, paper quality.
• View orders: allows users to view their order information such as number of cards ordered,
existing orders, delivery address and billing address.
• Edit user account information: allows users to edit their account information such as address, email and phone number.
• Search card gallery: allows users to search for card templates.
• Add to basket: allows users to add customised cards to the basket.
• Check out: allows users to pay for the cards they have ordered.
With reference to the OWL-S model:
(e) Explain what would be defined in the OWL-S service profile for the online card making
service.
[3 marks]
Continued . . .
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
lOMoARcPSD|24245766
3
CO7216
(f) Describe informally (OWL-S syntax not required) the functional properties of the online
card delivery service service.
[6 marks]
(g) Explain informally (defining the model is not required) how the Process model for such a
service would be designed. A figure may be used.
[8 marks]
Continued . . .
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
lOMoARcPSD|24245766
4
CO7216
Question 2.
(a) Enumerate the various semantic web languages in the order of expressiveness. A figure
may be used.
[3 marks]
(b) Explain the limitations of XML and describe how the vision of semantic web tries to overcome these limitations.
[4 marks]
(c) Explain some of the limitations of the expressive power of RDF Schema and describe how
OWL overcomes those limitations.
[5 marks]
(d) Given the following XML document
<?xml version= " 1. 0 " encoding = " ISO−8859−1 " ?>
< Cat alog>
<Plant>
<Common> B l o o d r o o t < /Common>
<Zone>4< / Zone>
< L i g h t > Most ly Shady< / L i g h t >
< P r i c e > 2.44 < / P r i c e >
< / Plant>
< Tool >
<Name>Grass t rimmer < / Name>
< t ype > E l e c t r i c < / t ype >
<Code>041560< / code>
< / Tool >
< / Cat alog >
i. Write an XML Schema for the above XML document.
[3 marks]
ii. Write an RDF document that corresponds to the above XML document. You can use
either the Turtle notation or the RDF/XML syntax. For syntax reference use the RDF
helper sheet given. The headers for the document can be ignored.
[4 marks]
iii. Write a SPARQL query that selects use, price, code and type for all tools from the
RDF document
[3 marks]
(e) Model the following travel ontology in RDFS using Turtle. Refer to the helper sheet for
important namespaces.
Aircraft, Train and Bus are transport modes. High Speed train is a type of train. Trains
are driven by drivers. Drivers have names. Trains have carriages. Each carriage is of a
specific class (e.g. standard class or first class). City buses and coaches are types of
buses.
Assume all properties take values of type string.
[8 marks]
Continued . . .
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
lOMoARcPSD|24245766
5
CO7216
Question 3.
For questions (a) to (d), consider the following domain of “Hospitals”.
A hospital has several staff members. As medical staff, the hospital employs surgeons, consultants, nurses, physicians and lab technicians. Surgeons, consultants and physicians are doctors. The hospital provides several services for its patients. The services are of type pharmacy,
surgery, consultancy, home visits, accidents and emergency (A&E) and cafeteria. The hospital
has medical departments such as neurology, maternity, dentistry, orthopaedics, gynaecology.
Each department has its own team of doctors and nurses. Surgeons are doctors that perform
surgery. Surgery can be a minor surgery or a major surgery. Doctors may be senior, junior or
interns. The hospital also provides doctors and nurses for home visits of the patients if required.
Each doctor or nurse can make only a limited number of home visits per day.
(a) Define classes using your ontology for the questions (i) to (iv) below. Use the OWL syntax
or OWL abstract syntax (or a reasonable approximation). Carefully distinguish “someValuesFrom” from “allValuesFrom”. You may use the OWL helper sheet in the appendix for
help on OWL syntax.
i. A Physician who works only in the department of Orthopaedics.
[2 marks]
ii. Cardiology which is a type of department.
[2 marks]
iii. A Surgeon who performs some major surgery.
[2 marks]
iv. A nurse who is allowed to make atmost two home visits per day.
[2 marks]
(b) Identify six concepts and ten properties relevant to the domain. You can write your answer
as
Concepts: Concept1, Concept2, ...
Properties: Property1, Property2, ....
[3 marks]
(c) Indicate the hierarchies (subclasses) for the concept: “Services”, “Medical Staff” and
“Medical Department”. You may draw the hierarchies either as diagrams, use the outline style or write the ontologies using the OWL syntax. A helper sheet is provided. Note:
you may add other concepts, and it may be necessary to do so to complete the exercise.
Assume that all primitives are disjoint.
[3 marks]
(d) Give three examples of properties specific to the domain. Property types may chosen
from inverse, unique (functional), transitive, or symmetric property respectively. Do not
give more than one example of each property type. In case of inverse, note the property
for which this is an inverse. Define domain and range restrictions for the properties. You
may choose properties identified for answering questions a(i) to a(iv).
[3 marks]
(e) Answer the questions below:
i. What is the role of Ontologies in the context of semantic web?
[3 marks]
ii. What are the different kinds of information an ontologies can include?
[3 marks]
Continued . . .
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
lOMoARcPSD|24245766
6
iii. Explain the ontology life cycle with the help of a figure.
CO7216
[4 marks]
iv. Enumerate a few ontology languages that can be used for the semantic web.
[3 marks]
Continued . . .
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
lOMoARcPSD|24245766
7
CO7216
Namespace
base="http://www.co7216exam/Ontology.owl"
rdfs="http://www.w3.org/2000/01/rdf-schema#"
owl="http://www.w3.org/2002/07/owl#"
xsd="http://www.w3.org/2001/XMLSchema#"
rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
foaf="http://xmlns.com/foaf/0.1/"
RDF helper
RDF Schema
<?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#">
<rdfs:Class rdf:ID="Course">
<rdfs:comment>Class representing a course</rdfs:comment>
<rdfs:subClassOf
rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource"/>
</rdfs:Class>
<rdf:Property rdf:ID="name">
<rdfs:comment>Name of a Course</rdfs:comment>
<rdfs:domain rdf:resource="#Course"/>
<rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Literal"/>
</rdf:Property>
</rdf:RDF>
RDF example
<?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://your-file-url/course_schema.rdf#">
<Course rdf:ID="CO2716">
<name>Programming XML in Java</name>
</Course>
</rdf:RDF>
OWL Helper
<owl:Class rdf:ID="Large-Format">
Continued . . .
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
lOMoARcPSD|24245766
8
CO7216
<rdfs:subClassOf rdf:resource="#Camera"/>
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#body"/>
<owl:allValuesFrom rdf:resource="#BodyWithNonAdjustableShutterSpeed"/>
</owl:Restriction>
</rdfs:subClassOf>
</owl:Class>
<owl:Class rdf:ID="Digital">
<rdfs:subClassOf rdf:resource="#Camera"/>
</owl:Class>
<owl:ObjectProperty rdf:ID="lens">
<rdfs:subPropertyOf rdf:resource="#part"/>
<rdfs:domain rdf:resource="#Camera"/>
<rdfs:range rdf:resource="#Lens"/>
</owl:ObjectProperty>
<owl:DatatypeProperty rdf:ID="f-stop">
<owl:equivalentProperty rdf:resource="#aperture"/>
<rdfs:domain rdf:resource="#Lens"/>
<rdfs:range rdf:resource="http://www.w3.org/2001/XMLSchema#string"/>
</owl:DatatypeProperty>
<owl:Class rdf:ID="BodyWithNonAdjustableShutterSpeed">
<owl:intersectionOf rdf:parseType="Collection">
<owl:Class rdf:about="#Body"/>
<owl:Restriction>
<owl:onProperty rdf:resource="#shutter-speed"/>
<owl:cardinality>0</owl:cardinality>
</owl:Restriction>
</owl:intersectionOf>
</owl:Class>
Downloaded by Hazam Hazam (hazam7azam@gmail.com)
Download