Question: How is Waterloo (the one that origins from Soviet Union) related to Napoleonic Wars ?
Choices:
penalty
located in or next to body of water
occupation
contributing factor of
inspired by
main subject
afflicts
replaced by
software engine
narrator
Answer: main subject
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Waterloo" . ?e_1 <country_of_origin> ?e_3 . ?e_3 <pred:name> "Soviet Union" . ?e_2 <pred:name> "Napoleonic Wars" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Soviet Union
function: Relate
dependencies: 0
inputs: country of origin
backward
function: Find
inputs: Waterloo
function: And
dependencies: 1
2
function: Find
inputs: Napoleonic Wars
function: QueryRelation
dependencies: 3
4