Question: Tell me the relationship from Anna Karenina (the one that comes from the Russian Empire) to Leo Tolstoy.
Choices:
season starts
author
filming location
contains settlement
practiced by
said to be the same as
geographic distribution
language of work or name
honorific prefix
candidacy in election
Answer: author
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Anna Karenina" . ?e_1 <country_of_origin> ?e_3 . ?e_3 <pred:name> "Russian Empire" . ?e_2 <pred:name> "Leo Tolstoy" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Russian Empire
function: Relate
dependencies: 0
inputs: country of origin
backward
function: Find
inputs: Anna Karenina
function: And
dependencies: 1
2
function: Find
inputs: Leo Tolstoy
function: QueryRelation
dependencies: 3
4