Question: What is the number of Canadian provinces that is an administrative Canadian division or that you can find in South America?
Choices:
7
8
9
10
11
12
13
14
15
16
Answer: 10
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "province of Canada" .  { ?e_1 <contains_administrative_territorial_entity> ?e . ?e_1 <pred:name> "Canada" .  } UNION { ?e <located_in_or_next_to_body_of_water> ?e_1 . ?e_1 <pred:name> "South America" .  } }
Program:
function: Find
inputs: Canada
function: Relate
dependencies: 0
inputs: contains administrative territorial entity
forward
function: FilterConcept
dependencies: 1
inputs: province of Canada
function: Find
inputs: South America
function: Relate
dependencies: 3
inputs: located in or next to body of water
backward
function: FilterConcept
dependencies: 4
inputs: province of Canada
function: Or
dependencies: 2
5
function: Count
dependencies: 6