Question: How many entertainments are there that are called Spider-Man 2, or based on Pirates of the Caribbean: At World's End (the one that origins from United States of America)?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 2
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "entertainment" .  { ?e <title> ?pv . ?pv <pred:value> "Spider-Man 2" .  } UNION { ?e <based_on> ?e_1 . ?e_1 <pred:name> "Pirates of the Caribbean: At World's End" . ?e_1 <country_of_origin> ?e_2 . ?e_2 <pred:name> "United States of America" .  } }
Program:
function: FindAll
function: FilterStr
dependencies: 0
inputs: title
Spider-Man 2
function: FilterConcept
dependencies: 1
inputs: entertainment
function: Find
inputs: United States of America
function: Relate
dependencies: 3
inputs: country of origin
backward
function: Find
inputs: Pirates of the Caribbean: At World's End
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: based on
backward
function: FilterConcept
dependencies: 7
inputs: entertainment
function: Or
dependencies: 2
8
function: Count
dependencies: 9