Question: How many science fictions are the genre of The Three Musketeers (whose genre is steampunk) or are the genre of The X-Files (which has Glen Morgan as an executive producer)?
Choices: 0
1
2
3
4
5
6
7
8
9
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "science fiction" .  { ?e_1 <genre> ?e . ?e_1 <pred:name> "The Three Musketeers" . ?e_1 <genre> ?e_2 . ?e_2 <pred:name> "steampunk" .  } UNION { ?e_1 <genre> ?e . ?e_1 <pred:name> "The X-Files" . ?e_1 <executive_producer> ?e_2 . ?e_2 <pred:name> "Glen Morgan" .  } }
Program:
function: Find
inputs: steampunk
function: Relate
dependencies: 0
inputs: genre
backward
function: Find
inputs: The Three Musketeers
function: And
dependencies: 1
2
function: Relate
dependencies: 3
inputs: genre
forward
function: FilterConcept
dependencies: 4
inputs: science fiction
function: Find
inputs: Glen Morgan
function: Relate
dependencies: 6
inputs: executive producer
backward
function: Find
inputs: The X-Files
function: And
dependencies: 7
8
function: Relate
dependencies: 9
inputs: genre
forward
function: FilterConcept
dependencies: 10
inputs: science fiction
function: Or
dependencies: 5
11
function: Count
dependencies: 12
Answer: 2