Question: What is the relationship between Hamlet, with Marianne Faithful in the cast, to William Shakespeare, born in Stratford-upon-Avon?
Choices:
designed to carry
takes place in fictional universe
family
tributary
musical conductor
has contributing factor
place of burial
native language
after a work by
professorship
Answer: after a work by
SPARQL: SELECT DISTINCT ?p WHERE { ?e_1 <pred:name> "Hamlet" . ?e_1 <cast_member> ?e_3 . ?e_3 <pred:name> "Marianne Faithfull" . ?e_2 <pred:name> "William Shakespeare" . ?e_2 <place_of_birth> ?e_4 . ?e_4 <pred:name> "Stratford-upon-Avon" . ?e_1 ?p ?e_2 .  }
Program:
function: Find
inputs: Marianne Faithfull
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Hamlet
function: And
dependencies: 1
2
function: Find
inputs: Stratford-upon-Avon
function: Relate
dependencies: 4
inputs: place of birth
backward
function: Find
inputs: William Shakespeare
function: And
dependencies: 5
6
function: QueryRelation
dependencies: 3
7