00: All Diamond-Marked Questions Flashcards

1
Q

What are the problems with the current Keyword-Based Search Engines?

A
  • Key problem: The meaning of Web content is not machine-accessible: lack of semantics
  • High recall, low precision.
  • Low or no recall
  • Results are highly sensitive to vocabulary
  • Results are single Web pages
  • Human involvement is necessary to interpret and combine results
  • Results of Web searches are not readily accessible by other software tools
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the characteristics of a Semantic Web Enabled Knowledge
Management?

A
  • organizing knowledge in conceptual spaces according to its meaning.
  • having automated tools for maintenance and knowledge discovery
  • answering any query semantically
  • answering any query over several documents
  • defining who may view certain parts of information (even parts of documents) will be possible
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What will a personal agent on the Semantic Web do? Name its operations one after another chronically (in a time-based sequence).

A
  • receive some tasks and preferences from the person
  • seek information from Web sources, communicate with other agents
  • compare information about user requirements and preferences, make certain choices
  • give answers to the user
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you resolve this issue so that referee(X,Y,Z) can also be represented with triplets?

A
  • We introduce:
    • a new auxiliary resource chessGame
    • the binary predicates ref, player1, and player2
  • We can represent referee(X,Y,Z) in the following image
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

By applying the two simplification rules you learned, convert the following RDF in the image to its abbreviated syntax.

A

Simplification rules:

  1. Childless property elements within description elements may be replaced by XML attributes
  2. For description elements with a typing element we can use the name specified in the rdf:type element instead of rdf:Description
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Perform reification on the following statement in the image and give it the ID of StatementAbout949352.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the main issues which help developers to lower their development cost with respect to using RDF and SPARQL?

A
  • the explicitness of queries,
  • the techniques used for the fast execution of queries employed by SPARQL,
  • the flexibility of RDF, and
  • the capability of merging results from multiple data sources in SPARQL
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the result of the following image?

A

x name

_:r “Alice”

_:s “Bob”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Write a SPARQL command for writing the name of all movies and their directors for every movie in which MacWin has played, sorted based on the names of movies.

A

SELECT ?movie ?director

WHERE {

:MacWin played-in ?movie .

?director directed ?movie .

}

ORDER BY ?movie

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  • *Write a SPARQL command for writing the number of movies in which each actor has played.**
  • *Hint: use GROUP BY**
A

SELECT ?actor (count(?movie) as ?movieCount)

WHERE {

?actor played-in ?movie

}

GROUP BY ?actor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Write a SPARQL command for writing the number of movies in which MacWin has played.
Hint: use COUNT

A

SELECT (count(?movie) as ?movieCount)

WHERE {

:MacWin played-in ?movie

}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q
  • *Write a SPARQL command for writing the number of movies in which each actor has played. Your command should only display those who have played in more than 6 movies.**
  • *Hint: use HAVING**
A

SELECT ?actor (count(?movie) as ?movieCount)

WHERE {

?actor played-in ?movie

}

GROUP BY ?actor

HAVING (?movieCount > 6)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the output of the following image?

A

All triplets in foaf version 1 (the RDF file)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
  • *By using the implication symbol, write an implication formula for the following image.**
  • *Hint: Complete the following: PropVal(domain,?p,?d) -> ???**
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

By using the implication symbol, write an implication formula for the following image.

Hint: Complete the following: PropVal(range, ?p, ?r) -> ???

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

By using biconditional symbol, write a biconditional formula for:
P is a subproperty of P’, if P’(x,y) is true whenever P(x,y) is true.
Note that P and P‘ both should be of type Property.
Hint: Complete the following: PropVal(subPropertyOf,?p,?p’) <–> ???

A
17
Q

Write a query for displaying the number of uses for each predicate in the dataset.

A

SELECT ?p (count(?p) as ?pCount)

WHERE {

[] ?p [] .

}

GROUP BY ?p

18
Q

Write the code in the following image in English.

A

Only professors teach first-year subjects

19
Q

Write the code in the following image in English.

A

One of the math courses is taught by #949352

20
Q

Write three examples for each of the transitive and symmetric properties.

A
  • SYMMETRIC:
    1. “X isMarriedTo Y” means “Y isMarriedTo X”.
    2. “Z equals D“ means “D equals Z“
    3. ” A co-worker-of B” means “ B co-worker-of A”
  • TRANSITIVE:
    1. ​​​if A implies B and B implies C, then A implies C
    2. if “Z equals D” and “D equals E” means “Z equals E“
    3. if “X sub-set-of Y” and “Y sub-set-of Z” means “X sub-set Z“
21
Q

Assuming #staffMember, #faculty, and #techSupportStaff” have all been defined as classes, by the use of nesting Boolean operators, complete the following code for defining adminStaff. Please indent statements for the sake of clarity.

A
22
Q

By the use of two examples, one in databases and the other in Web, describe how a database uses a closed world and Web uses open world assumptions.

A

Web present data about uncounted concepts, consider the following statement: “Tim Smith with the ID of 785654549 is a citizen of France.”

Now, what if you ask “Is Tim Smith with the ID of 785654549 a citizen of Malaysia?” Under a closed world assumption, the answer is “no” whereas under the open world assumption the answer is “not known”.

Web is full of such kinds of data. Hence, open world assumption is used in a system with incomplete information, to which Web belongs.

On the other hand, databases usually presents data about limited concepts, say a university.

For instance, if the database of UOW shows that Tim Smith with the ID of 785654549 is not UOW’s student, definitely he is not UOW’s student. Moreover, in Web, non-unique names are used, and two different ID may show the same resource, whereas in database this not the case closed world assumption is applied to systems with complete information.

23
Q

Change the following SELECT command so that as well as writing the name of graphs (datasets), it writes the number of triplets in each graph as well.

SELECT DISTINCT ?g

{ graph ?g {[] [] [] .} }

A

SELECT ?g count(?g)
{ graph ?g {[] [] [] .} }
GROUP BY ?g

24
Q

What is the output of the following image?

A

Title
“SPARQL Protocol Tutorial“
“SPARQL“
“SPARQL (updated)”
“SPARQL Query Language Tutorial”

25
Q

Show the following statement in DL (as well as in Protégé):

Assume that for a person to be called a student, he/she needs to attend at least 4 courses.

A
26
Q

Based on the information in the image, write the necessary DL statement in Protégé to display the list of instructions for lightweight cameras.

A

Instruction and about some (Camera and hasWeight value light)

27
Q

Assume you have three classes of Team, Player, and Position.
Also, assume you have two properties of employs, and plays:
team1 employs player1
player1 plays position1
Write a descriptive logic statement in Protégé that returns the teams which have employed at least 3 players who play as striker or rightBack position.

A

Team and employs min 3 (Player and hasPosition some {striker, rightBack})

28
Q

Assuming you have hasParent, hasSister, hasSibling, hasBrother, and hasChild properties, build the concept of a cousin based on a chain of properties through defining hasCousin.

A

hasCousin is a chain of properties of hasParent o hasSibling o hasChild

29
Q

Write the SPARQL code for finding how many times each property has appeared in triplets.

A

SELECT ?property (count (?property) as ?numPro)

WHERE {

?object ?property ?subject .

}

GROUP BY ?property

30
Q

Write the SPARQL code for finding all individuals of classes which have a superclass.

A

SELECT *

WHERE {

?individual rdf:type ?type .

?type rdfs:subClassOf ?class

}

ORDER BY ?class

31
Q

Write the SPARQL code for finding all individuals of classes as well as their superclass, if any.

A

SELECT *

WHERE {

?individual rdf:type ?type

OPTIONAL { ?type rdfs:subClassOf ?class }

}

ORDER BY ?class

32
Q

Which of the following inferred relations is wrong? Why?

  1. male(X), parent(P,X), parent(P,Y), notSame(X,Y) brother(X,Y)
  2. female(X), parent(P,X), parent(P,Y), notSame(X,Y) sister(X,Y)
  3. brother(X,P), parent(P,Y) uncle(X,Y)
  4. mother(X,P), parent(P,Y) grandmother(X,Y)
  5. ancestor(X,P), parent(P,Y) ancestor(X,Y)
  6. ancestor(X,P), ancestor (P,Y) ancestor(X,Y)
  7. mother(X,P), parent(P,Y) grandmother(X,Y)
  8. female(X), parent(P,X), parent(P,Y) sister(X,Y)
A

#8: female(X), parent(P,X), parent(P,Y) sister(X,Y) is wrong Because X may be Y and we need also notSame(X,Y) to have sister(X,Y)

33
Q

How in Horn logic can you express that C is a subclass of the intersection of D1 and D2?

A

C(X) -> D1(X)

C(X) -> D2(X)

34
Q

How, as a pair of rules in Horn logic, can you express that the union of C1 and C2 is a subclass of D?

A

C1(X) -> D(X)

C2(X) -> D(X)

35
Q

Write a SPARQL command to find the first 50 concepts of DBpedia.

Test your query in http://dbpedia.org/sparql.

A

SELECT DISTINCT ?concept

WHERE {

?s a ?concept .

}

LIMIT 50

36
Q

Write a SPARQL command to find whether or not the Amazon river is longer than the Nile River.

Hint: Use the following terms in the image.

A
37
Q

Create any simple wild-life ontology including its class hierarchy, properties, and restrictions.

A

Properties:

  • eats: inverse of eaten-by
  • is-part-of: transitive

Examples:

  • branch is-part-of tree
  • leaf is-part-of branch

Restrictions:

  • carnivore: animals which eat animal
  • herbivore: animals which each eat leaf
38
Q

Write the equivalents of the following statements about your wild-life ontology, as facts, rules, and questions.

“clyde” is a Tiger
“simi” is a Rabbit
A Rabbit hates any Tiger
A Rabbit is a Species
A Tiger is a Species
***********************
Is “clyde” a Species?
Does “simi” dislike “clyde”?

A

Facts:

  • Tiger(clyde)
  • Rabbit(simi)

Rules:

  • Hate(X,Y) -> Dislike (X,Y)
  • Rabbit(X), Tiger(Y) -> Hate(X,Y)
  • Rabbit(X) -> Species(X)
  • Tiger(X) -> Species(X)

Questions:

  • -> Species(clyde)
  • -> DisLike(simi,clyde)
39
Q

Assume that in an OWL file, you have two separate classes of Man and Woman. Write a SQWRL command to return the total number of elements of these two classes.

A

Man(?m) ^ Woman(?w) ˚ sqwrl:makeSet(?s1, ?m) ^ sqwrl:makeSet(?s2, ?fm) ˚ sqwrl:union(?s, ?s1, ?s2) ^ sqwrl:size(?n, ?s) -> sqwrl:select(?n)