Question: Judge Robert Shaw died in the human settlement that borders how many other human settlements?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 3
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "human settlement" . ?e_1 <shares_border_with> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "human settlement" . ?e_2 <place_of_death> ?e_1 . ?e_2 <pred:name> "Robert Shaw" . ?e_2 <occupation> ?e_3 . ?e_3 <pred:name> "judge" .   }
Program:
function: Find
inputs: judge
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: Robert Shaw
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: place of death
forward
function: FilterConcept
dependencies: 4
inputs: human settlement
function: Relate
dependencies: 5
inputs: shares border with
forward
function: FilterConcept
dependencies: 6
inputs: human settlement
function: Count
dependencies: 7