Question: What is the title of the silent film that is written by William Shakespeare (the one that has the occupation of author) ?
Choices:
The Cleveland Show
Percy Jackson & the Olympians: The Lightning Thief
Death on the Nile
Don't Be Afraid of the Dark
All in the Family
Core Secretary
Chinatown
The Passion of the Christ
Hamlet
The Ghost Writer
Answer: Hamlet
SPARQL: SELECT DISTINCT ?pv WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "silent film" . ?e <after_a_work_by> ?e_1 . ?e_1 <pred:name> "William Shakespeare" . ?e_1 <occupation> ?e_2 . ?e_2 <pred:name> "author" .  ?e <title> ?pv .  }
Program:
function: Find
inputs: author
function: Relate
dependencies: 0
inputs: occupation
backward
function: Find
inputs: William Shakespeare
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: after a work by
backward
function: FilterConcept
dependencies: 4
inputs: silent film
function: QueryAttr
dependencies: 5
inputs: title