Question: Which President of the United States was John Quincy Adams (the head of the government of the United States of America)?
Choices:
151
6
20
68
24
45
10
12
23
49
Answer: 6
SPARQL: SELECT DISTINCT ?qpv WHERE { ?e_1 <pred:name> "John Quincy Adams" . ?e_3 <head_of_government> ?e_1 . ?e_3 <pred:name> "United States of America" . ?e_2 <pred:name> "President of the United States" . ?e_1 <position_held> ?e_2 . [ <pred:fact_h> ?e_1 ; <pred:fact_r> <position_held> ; <pred:fact_t> ?e_2 ] <series_ordinal> ?qpv .  }
Program:
function: Find
inputs: United States of America
function: Relate
dependencies: 0
inputs: head of government
forward
function: Find
inputs: John Quincy Adams
function: And
dependencies: 1
2
function: Find
inputs: President of the United States
function: QueryRelationQualifier
dependencies: 3
4
inputs: position held
series ordinal