Question: Among the animated feature films that contain Shrek (whose children number is 3), which has the largest cost?
Choices:
Winnie the Pooh
WALL·E
Peter Pan
Shrek 2
Shrek Forever After
Renaissance
Shrek
Beauty and the Beast
Aladdin
Shrek the Third
Program:
function: Find
inputs: Shrek
function: FilterNum
dependencies: 0
inputs: number of children
3
=
function: Relate
dependencies: 1
inputs: present in work
forward
function: FilterConcept
dependencies: 2
inputs: animated feature film
function: SelectAmong
dependencies: 3
inputs: cost
largest
SPARQL: SELECT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "animated feature film" . ?e_1 <present_in_work> ?e . ?e_1 <pred:name> "Shrek" . ?e_1 <number_of_children> ?pv_1 . ?pv_1 <pred:unit> "1" . ?pv_1 <pred:value> "3"^^xsd:double . ?e <cost> ?pv . ?pv <pred:value> ?v .  } ORDER BY DESC(?v) LIMIT 1
Answer: Shrek Forever After