Question: What is the number of capital that is the twinned administrative body of Belo Horizonte or that use Malayalam as the official language ?
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> "capital" .  { ?e_1 <twinned_administrative_body> ?e . ?e_1 <pred:name> "Belo Horizonte" .  } UNION { ?e <official_language> ?e_1 . ?e_1 <pred:name> "Malayalam" .  } }
Program:
function: Find
inputs: Belo Horizonte
function: Relate
dependencies: 0
inputs: twinned administrative body
forward
function: FilterConcept
dependencies: 1
inputs: capital
function: Find
inputs: Malayalam
function: Relate
dependencies: 3
inputs: official language
backward
function: FilterConcept
dependencies: 4
inputs: capital
function: Or
dependencies: 2
5
function: Count
dependencies: 6
Answer: 2