Question: How many water areas are either in the location of Corsica (the one whose location is Mediterranean Sea) or share a border with the Atlantic Ocean?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "water area" .  { ?e_1 <location> ?e . ?e_1 <pred:name> "Corsica" . ?e_1 <location> ?e_2 . ?e_2 <pred:name> "Mediterranean Sea" .  } UNION { ?e <shares_border_with> ?e_1 . ?e_1 <pred:name> "Atlantic Ocean" .  } }
Program:
function: Find
inputs: Mediterranean Sea
function: Relate
dependencies: 0
inputs: location
backward
function: Find
inputs: Corsica
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: location
forward
function: FilterConcept
dependencies: 4
inputs: water area
function: Find
inputs: Atlantic Ocean
function: Relate
dependencies: 6
inputs: shares border with
backward
function: FilterConcept
dependencies: 7
inputs: water area
function: Or
dependencies: 5
8
function: Count
dependencies: 9
Answer: 2