Question: How many animated person that derives The Gift (the one that has David Denman as a cast member) or whose name in local language is Jonah Hex
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "animated character" .  { ?e_1 <based_on> ?e . ?e_1 <pred:name> "The Gift" . ?e_1 <cast_member> ?e_2 . ?e_2 <pred:name> "David Denman" .  } UNION { ?e <name_in_native_language> ?pv . ?pv <pred:value> "Jonah Hex" .  } }
Program:
function: Find
inputs: David Denman
function: Relate
dependencies: 0
inputs: cast member
backward
function: Find
inputs: The Gift
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: based on
forward
function: FilterConcept
dependencies: 4
inputs: animated character
function: FindAll
function: FilterStr
dependencies: 6
inputs: name in native language
Jonah Hex
function: FilterConcept
dependencies: 7
inputs: animated character
function: Or
dependencies: 5
8
function: Count
dependencies: 9