Question: How many rivers either go into the North Sea or share a border with Albany (the one that shares border with Hudson River)?
Choices:
2
3
4
5
6
7
8
9
10
11
Program:
function: Find
inputs: North Sea
function: Relate
dependencies: 0
inputs: mouth of the watercourse
backward
function: FilterConcept
dependencies: 1
inputs: river
function: Find
inputs: Hudson River
function: Relate
dependencies: 3
inputs: shares border with
forward
function: Find
inputs: Albany
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: shares border with
forward
function: FilterConcept
dependencies: 7
inputs: river
function: Or
dependencies: 2
8
function: Count
dependencies: 9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "river" .  { ?e <mouth_of_the_watercourse> ?e_1 . ?e_1 <pred:name> "North Sea" .  } UNION { ?e_1 <shares_border_with> ?e . ?e_1 <pred:name> "Albany" . ?e_2 <shares_border_with> ?e_1 . ?e_2 <pred:name> "Hudson River" .  } }
Answer: 3