联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981
COMP318 DEPARTMENT : Computer Science
SECOND SEMESTER EXAMINATIONS 2021/22
Ontologies and Semantic Web
TIME ALLOWED : Two and a Half Hours
INSTRUCTIONS TO CANDIDATES
Answer ALL questions in Section A.
Answer TWO OUT OF THREE questions in Section B.
If you attempt to answer more questions than the required number of questions (in any section),
the marks awarded for the excess questions answered will be discarded (starting with your
lowest mark).
PAPER CODE COMP318 page 1 of 7 Continued
SECTION A
Answer all FIVE questions from this section. Section A is worth 50 marks.
1. (a) Ontology evaluation is the process of assessing the quality of an ontology. Describe
the two activities that are performed when evaluating an ontology. (5 marks)
(b) Discuss the benefits of having a formal ontology language when evaluating the quality
of an ontology, especially with respect to the two activities above. (5 marks)
(10 marks total)
2. (a) Explain what inference rules are and how they are used in the context of reasoning
with RDF(S) (5 marks).
(b) Explain what SE1 and SE2 are, and provide their syntax (5 marks) .
(10 marks total)
3. Consider the ontology expressed in Manchester syntax presented below:
Prefix:
Prefix: owl:
Prefix: rdf:
Prefix: rdfs:
Prefix: xml:
Prefix: xsd:
Ontology:
ObjectProperty: hasMember InverseOf: isMemberOf
ObjectProperty: hasTrack Domain: Album Range: Song
ObjectProperty: hasWriter Domain: Song Range: Artist
ObjectProperty: isMemberOf InverseOf: hasMember
ObjectProperty: plays Domain: Artist Range: Instrument
ObjectProperty: recordedBy Domain: (Album or Song) Range: Musician InverseOf: records
ObjectProperty: records InverseOf: recordedBy
DataProperty: hasLength Domain: Song Range: xsd:string
Class: Instrument
Class: Musician
Class: Album
SubClassOf:
hasTrack min 1 Song
Class: Artist
SubClassOf:
Musician
and ((isMemberOf some Group) or (records some Song)),
plays some Instrument
Class: FamousGroup
SubClassOf:
Group,
hasMember only SoloArtist
PAPER CODE COMP318 page 2 of 7 Continued
Class: Group
SubClassOf:
Musician
and (hasMember min 2 owl:Thing)
Class: SoloArtist
SubClassOf:
Artist
and (records some Song)
Class: Song
SubClassOf:
hasWriter some Artist
Individual: TheBeatles Types: Group
Individual: PaulMcCartney Types: SoloArtist
Individual: JohnLennon Types: SoloArtist
Individual: GeorgeHarrison Types: SoloArtist
Individual: RingoStarr Types: SoloArtist
Individual: LoveMeDo Types: Song
Facts:
hasWriter JohnLennon,
hasWriter PaulMcCartney,
hasLength “1:25”
Individual: PleasePleaseMe Types: Album
DifferentIndividuals: GeorgeHarrison, JohnLennon, LoveMeDo,
PaulMcCartney, RingoStarr, TheBeatles
(a) Provide the definition of the following restrictions in OWL:
a. Universal restrictions, (3 marks)
b. Existential restriction. (3 marks)
(b) Identify in the ontology above an example of:
a. Universal restriction, (2 marks)
b. Cardinality restriction. (2 marks)
(10 marks total)
4. In ontology alignment a correspondence creates a relation between different entities in
an ontology (classes, properties, or individuals). Describe the types of correspondence
relations that can exist between classes belonging to different ontologies to be matched,
and provide an example for each of these relations. (10 marks)
5. a. Describe what a Knowledge Graph (KG) is, provide its formal definition and include
at least one of its characteristics. (5 marks)
b. KGs are often modelled as linked data (e.g. DBpedia). Describe the 5 principles for
publishing data as linked data. (5 marks)
PAPER CODE COMP318 page 3 of 7 Continued
SECTION B
Answer TWO questions from this section. Each question is worth 25 marks. Credit will be
given for the best 2 answers only.
1. (a) An ontology alignment A between a source ontology O1 and a target ontology O2
comprises a set of tuples h e1, e2, r, wi . Define what each of these symbols represent in
the definition . (4 marks)
(b) Explain the difference between an internal alignment and an external one. Provide
concrete examples in your explanation. (6 marks)
(c) An ontology alignment system A is evaluated with respect to a set 120 of reference
correspondences (gold standard), R. A generates 110 correspondences of which 45 are
incorrect. Discuss the different measures you could use to evaluate the performance
of an alignment system and explain what each tells you about the alignment. Show the
formulae and calculations of these measures for the alignment system A. (15 marks)
PAPER CODE COMP318 page 4 of 7 Continued
2. Consider the following RDF graph G, expressed in Turtle, where the triples have been
numbered to improve readability.
PREFIX rdf:
PREFIX rdfs:
PREFIX ex:
PREFIX foaf:
1 ex:Vampire a rdfs:Class .
2 ex:Parent a rdfs:Class ;
3 rdfs:subClassOf ex:Vampire .
4 ex:Child a rdfs:Class ;
5 rdfs:subClassOf ex:Vampire .
6 ex:carlisle ex:hasChild ex:edward .
7 ex:hasChild a rdf:Property ;
8 rdfs:domain ex:Parent;
9 rdfs:range ex:Child ;
10 rdfs:subPropertyOf schema:relatedTo .
(a) Can you entail the statement :n schema:relatedTo :n . from G If the state_xfffe_ment is entailed by G, then use the simple entailment rules (se1, se2) and the RDFS
entailment rules (rdfs1, . . . , rdfs13) to prove that your answer is correct. If the state ment is not entailed, then explain, informally or formally, why this is so. A summary
of the RDFS entailment rules is provided at the end of this exam paper. (5 marks)
(b) List all the additional non-trivial triples (trivial triples are those axiomatically true,
e.g. rdf:type rdf:type rdf:Property .) that can be inferred from G using
only the RDFS entailment rules. For each additional triple found, show the entailment
procedure used to obtain it. (20 marks)
PAPER CODE COMP318 page 5 of 7 Continued
3. The first part of this question is about translating requirements in OWL. For this task, use
the following class and property names, without namespaces:
Classes: Company, Region, License, ActiveRegion, OperatorCompany
Properties: operator, partner, hasLicense, startDate, endDate
Note also the following constraints:
A “license” gives several companies the right to exploit diamond reserves in a region.
These companies are known as the “partners” of the license, and one (and only one)
of these partners is known as the “operator”;
“hasLicense” is the object property linking a region to a license, and “operator” and
“partner” are object properties that link the license to its operator company and partner
companies;
A license is always valid during a certain period in time. We model the startDate
and endDate datatype properties to indicate the first and last day of the valid period
of a license, e.g.: L30 :startDate “2020-08-31″8sd:date .
(a) Express each of the following statements as one or more OWL axioms (using its Turtle
syntax):
1. A company is not a region;
2. Every partner of a license is a company;
3. Every license has one and only one operator;
4. The company that is the operator for a license is also a partner for that license
5. An “active region” is defined to be a region for which there is a license that is
valid during the period April to December 2020;
6. An “operator company” is a company that has a license, irrespectively of whether
the license is currently valid or not. (18 marks)
(b) Write the SPARQL queries corresponding to the following sentences:
1. find all the start and end dates of a license; (3 marks)
2. find every company with either its operator or its partner companies (4 marks)
PAPER CODE COMP318 page 6 of 7 Continued
For your convenience here are the RDFS-entailment patterns
is consistent even though its subject is an IRI rather than a literal. It says that the IRI ‘ex:a’ refers to a
literal value, which is quite possible since literal values are things in the universe. Blank nodes may
range over literal values, for the same reason.
9.2 RDFS entailment
S RDFS entails E recognizing D when every RDFS interpretation recognizing D which satisfies S also
satisfies E.
Since every RDFS interpretation is an RDF interpretation, if S RDFS entails E then S also RDF entails E;
but RDFS entailment is stronger than RDF entailment. Even the empty graph has a large number of
RDFS entailments which are not RDF entailments, for example all triples of the form
aaa rdf:type rdfs:Resource .
where aaa is an IRI, are true in all RDFS interpretations.
9.2.1 Patterns of RDFS entailment (Informative)
This section is non-normative.
RDFS entailment holds for all the following patterns, which correspond closely to the RDFS semantic
conditions:
RDFS entailment patterns.
If S contains: then S RDFS entails recognizing D:
rdfs1 any IRI aaa in D aaa rdf:type rdfs:Datatype .
rdfs2 aaa rdfs:domain xxx .
yyy aaa zzz . yyy rdf:type xxx .
rdfs3 aaa rdfs:range xxx .
yyy aaa zzz . zzz rdf:type xxx .
rdfs4a xxx aaa yyy . xxx rdf:type rdfs:Resource .
rdfs4b xxx aaa yyy. yyy rdf:type rdfs:Resource .
rdfs5 xxx rdfs:subPropertyOf yyy .
yyy rdfs:subPropertyOf zzz . xxx rdfs:subPropertyOf zzz .
rdfs6 xxx rdf:type rdf:Property . xxx rdfs:subPropertyOf xxx .
rdfs7 aaa rdfs:subPropertyOf bbb .
xxx aaa yyy . xxx bbb yyy .
rdfs8 xxx rdf:type rdfs:Class . xxx rdfs:subClassOf rdfs:Resource .
rdfs9 xxx rdfs:subClassOf yyy .
zzz rdf:type xxx . zzz rdf:type yyy .
rdfs10 xxx rdf:type rdfs:Class . xxx rdfs:subClassOf xxx .
rdfs11 xxx rdfs:subClassOf yyy .
yyy rdfs:subClassOf zzz . xxx rdfs:subClassOf zzz .
rdfs12 xxx rdf:type rdfs:ContainerMembershipProperty
.
xxx rdfs:subPropertyOf rdfs:member
.
rdfs13 xxx rdf:type rdfs:Datatype . xxx rdfs:subClassOf rdfs:Literal .
RDFS provides for several new ways to be unsatisfiable recognizing D. For example, the following graph
is RDFS unsatisfiable recognizing {xsd:integer, xsd:boolean}:
PAPER CODE COMP318 page 7 of 7 End


发表评论