Question: How many U.S. cities are the residence of Tia Carrere or have the capital of Honolulu (the one that is the filming location of Pearl Harbor)?
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> "city of the United States" .  { ?e_1 <official_residence> ?e . ?e_1 <pred:name> "Tia Carrere" .  } UNION { ?e <capital> ?e_1 . ?e_1 <pred:name> "Honolulu" . ?e_2 <filming_location> ?e_1 . ?e_2 <pred:name> "Pearl Harbor" .  } }
Program:
function: Find
inputs: Tia Carrere
function: Relate
dependencies: 0
inputs: official residence
forward
function: FilterConcept
dependencies: 1
inputs: city of the United States
function: Find
inputs: Pearl Harbor
function: Relate
dependencies: 3
inputs: filming location
forward
function: Find
inputs: Honolulu
function: And
dependencies: 4
5
function: Relate
dependencies: 6
inputs: capital
backward
function: FilterConcept
dependencies: 7
inputs: city of the United States
function: Or
dependencies: 2
8
function: Count
dependencies: 9
Answer: 2