Question: What is the connection between Hamlet (that has Marianne Faithfull as a cast member) and drama film?
Choices:
political ideology
conflict
film editor
has immediate cause
month of the year
art director
genre
operating system
field of work
soundtrack album
Answer: genre
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> "drama film" . ?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: drama film
function: QueryRelation
dependencies: 3
4