Question: How many Michigan counties have the capital St. Joseph (that is the capital of Berrien County) or are located in or next to Lake Superior?
Choices:
0
1
2
3
4
5
6
7
8
9
Program:
function: Find
inputs: Berrien County
function: Relate
dependencies: 0
inputs: capital
forward
function: Find
inputs: St. Joseph
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: capital
backward
function: FilterConcept
dependencies: 4
inputs: county of Michigan
function: Find
inputs: Lake Superior
function: Relate
dependencies: 6
inputs: located in or next to body of water
backward
function: FilterConcept
dependencies: 7
inputs: county of Michigan
function: Or
dependencies: 5
8
function: Count
dependencies: 9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Michigan" .  { ?e <capital> ?e_1 . ?e_1 <pred:name> "St. Joseph" . ?e_2 <capital> ?e_1 . ?e_2 <pred:name> "Berrien County" .  } UNION { ?e <located_in_or_next_to_body_of_water> ?e_1 . ?e_1 <pred:name> "Lake Superior" .  } }
Answer: 2