Question: How many towns are along the River Thames or are the HQ of the University of Essex?
Choices:
2
3
4
5
6
7
8
9
10
11
Answer: 5
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "town" .  { ?e <located_in_or_next_to_body_of_water> ?e_1 . ?e_1 <pred:name> "River Thames" .  } UNION { ?e_1 <headquarters_location> ?e . ?e_1 <pred:name> "University of Essex" .  } }
Program:
function: Find
inputs: River Thames
function: Relate
dependencies: 0
inputs: located in or next to body of water
backward
function: FilterConcept
dependencies: 1
inputs: town
function: Find
inputs: University of Essex
function: Relate
dependencies: 3
inputs: headquarters location
forward
function: FilterConcept
dependencies: 4
inputs: town
function: Or
dependencies: 2
5
function: Count
dependencies: 6