Question: How many Indiana counties are named after someone who was the President of the United States (replacing James Madison) ?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "county of Indiana" . ?e <named_after> ?e_1 . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "human" . ?e_1 <position_held> ?e_3 . ?e_3 <pred:name> "President of the United States" . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <position_held> ; <pred:fact_t> ?e_3 ] <replaces> ?qpv . ?qpv <pred:value> "James Madison" .   }
Program:
function: Find
inputs: President of the United States
function: Relate
dependencies: 0
inputs: position held
backward
function: QFilterStr
dependencies: 1
inputs: replaces
James Madison
function: FilterConcept
dependencies: 2
inputs: human
function: Relate
dependencies: 3
inputs: named after
backward
function: FilterConcept
dependencies: 4
inputs: county of Indiana
function: Count
dependencies: 5
Answer: 1