Question: Which movie is shorter, Tom Jones (the one that has Albert Finney as a cast member) or Robin Hood (the one whose publication date is 1912-01-01)?
Choices:
Robin Hood
Friends
The Animatrix
The Cure
Eve
The Fugitive
Tom Jones
Neighbours
Frankenstein
The Town
Program:
function: Find
inputs: Albert Finney
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: Tom Jones
function: And
dependencies: 1
2
function: Find
inputs: Robin Hood
function: FilterDate
dependencies: 4
inputs: publication date
1912-01-01
=
function: SelectBetween
dependencies: 3
5
inputs: duration
less
SPARQL: SELECT ?e WHERE { { ?e <pred:name> "Tom Jones" . ?e <cast_member> ?e_1 . ?e_1 <pred:name> "Albert Finney" . } UNION { ?e <pred:name> "Robin Hood" . ?e <publication_date> ?pv_1 . ?pv_1 <pred:date> "1912-01-01"^^xsd:date . } ?e <duration> ?pv . ?pv <pred:value> ?v .  } ORDER BY ?v LIMIT 1
Answer: Robin Hood