Question: What is the relationship between James Buchanan (the one that is the member of political party Republican Party) and Washington, D.C.?
Choices:
work location
capital
honorific suffix
field of this occupation
maintained by
discoverer or inventor
employer
patron saint
killed by
military rank
Answer: work location
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "James Buchanan" . ?e_1 <member_of_political_party> ?e_3 . ?e_3 <pred:name> "Republican Party" . ?e_2 <pred:name> "Washington, D.C." . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Republican Party
function: Relate
dependencies: 0
inputs: member of political party
backward
function: Find
inputs: James Buchanan
function: And
dependencies: 1
2
function: Find
inputs: Washington, D.C.
function: QueryRelation
dependencies: 3
4