Question: How many mountain ranges are in the Appalachian Mountains or have the Adirondack Mountains as their "child"?
Choices:
3
4
5
6
7
8
9
10
11
12
Answer: 3
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "mountain range" .  { ?e <mountain_range> ?e_1 . ?e_1 <pred:name> "Appalachian Mountains" .  } UNION { ?e_1 <mountain_range> ?e . ?e_1 <pred:name> "Adirondack Mountains" .  } }
Program:
function: Find
inputs: Appalachian Mountains
function: Relate
dependencies: 0
inputs: mountain range
backward
function: FilterConcept
dependencies: 1
inputs: mountain range
function: Find
inputs: Adirondack Mountains
function: Relate
dependencies: 3
inputs: mountain range
forward
function: FilterConcept
dependencies: 4
inputs: mountain range
function: Or
dependencies: 2
5
function: Count
dependencies: 6