Question: How many counties in Illinois are either in the USA or have a capital of Bloomington, the capital of McLean County?
Choices:
17
18
19
20
21
22
23
24
25
26
Answer: 18
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Illinois" .  { ?e <country> ?e_1 . ?e_1 <pred:name> "United States of America" .  } UNION { ?e_1 <capital_of> ?e . ?e_1 <pred:name> "Bloomington" . ?e_1 <capital_of> ?e_2 . ?e_2 <pred:name> "McLean County" .  } }
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: country
backward
function: FilterConcept
dependencies: 1
inputs: county of Illinois
function: Find
inputs: McLean County
function: Relate
dependencies: 3
inputs: capital of
backward
function: Find
inputs: Bloomington
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: capital of
forward
function: FilterConcept
dependencies: 7
inputs: county of Illinois
function: Or
dependencies: 2
8
function: Count
dependencies: 9