Question: How many New York counties have the capital Binghamton or were named after James Madison (who used English as a native language)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of New York" .  { ?e <capital> ?e_1 . ?e_1 <pred:name> "Binghamton" .  } UNION { ?e <named_after> ?e_1 . ?e_1 <pred:name> "James Madison" . ?e_1 <native_language> ?e_2 . ?e_2 <pred:name> "English" .  } }
Program:
function: Find
inputs: Binghamton
function: Relate
dependencies: 0
inputs: capital
backward
function: FilterConcept
dependencies: 1
inputs: county of New York
function: Find
inputs: English
function: Relate
dependencies: 3
inputs: native language
backward
function: Find
inputs: James Madison
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: named after
backward
function: FilterConcept
dependencies: 7
inputs: county of New York
function: Or
dependencies: 2
8
function: Count
dependencies: 9