Question: How many classes of awards were won by Ingrid Bergman or won by John Williams (the one that is famous for clarinet)?
Choices:
0
1
2
3
4
5
6
7
8
9
Program:
function: Find
inputs: Ingrid Bergman
function: Relate
dependencies: 0
inputs: winner
backward
function: FilterConcept
dependencies: 1
inputs: class of award
function: Find
inputs: clarinet
function: Relate
dependencies: 3
inputs: famous people
forward
function: Find
inputs: John Williams
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: winner
backward
function: FilterConcept
dependencies: 7
inputs: class of award
function: Or
dependencies: 2
8
function: Count
dependencies: 9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "class of award" .  { ?e <winner> ?e_1 . ?e_1 <pred:name> "Ingrid Bergman" .  } UNION { ?e <winner> ?e_1 . ?e_1 <pred:name> "John Williams" . ?e_2 <famous_people> ?e_1 . ?e_2 <pred:name> "clarinet" .  } }
Answer: 2