Question: How many activities are a derivative work of Superman (that derives Smallville) or are related to the sport association football?
Choices: 1
2
3
4
5
6
7
8
9
10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "activity" .  { ?e_1 <derivative_work> ?e . ?e_1 <pred:name> "Superman" . ?e_1 <derivative_work> ?e_2 . ?e_2 <pred:name> "Smallville" .  } UNION { ?e <sport> ?e_1 . ?e_1 <pred:name> "association football" .  } }
Program:
function: Find
inputs: Smallville
function: Relate
dependencies: 0
inputs: derivative work
backward
function: Find
inputs: Superman
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: derivative work
forward
function: FilterConcept
dependencies: 4
inputs: activity
function: Find
inputs: association football
function: Relate
dependencies: 6
inputs: sport
backward
function: FilterConcept
dependencies: 7
inputs: activity
function: Or
dependencies: 5
8
function: Count
dependencies: 9
Answer: 9