Question: How many neighborhoods are the headquarter location of Republic Pictures or are the narrative location of Malcolm X (the one whose director is Spike Lee)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "neighborhood" .  { ?e_1 <headquarters_location> ?e . ?e_1 <pred:name> "Republic Pictures" .  } UNION { ?e_1 <narrative_location> ?e . ?e_1 <pred:name> "Malcolm X" . ?e_1 <director> ?e_2 . ?e_2 <pred:name> "Spike Lee" .  } }
Program:
function: Find
inputs: Republic Pictures
function: Relate
dependencies: 0
inputs: headquarters location
forward
function: FilterConcept
dependencies: 1
inputs: neighborhood
function: Find
inputs: Spike Lee
function: Relate
dependencies: 3
inputs: director
backward
function: Find
inputs: Malcolm X
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: narrative location
forward
function: FilterConcept
dependencies: 7
inputs: neighborhood
function: Or
dependencies: 2
8
function: Count
dependencies: 9