Question: What is the number of empires that are the country of the capital city of the Mughal Empire until the ending year 1540?
Choices:
0
1
2
3
4
5
6
7
8
9
Answer: 1
SPARQL: SELECT (COUNT(DISTINCT ?e) AS ?count) WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "empire" . ?e_1 <country> ?e . ?e_1 <pred:instance_of> ?c_1 . ?c_1 <pred:name> "city" . ?e_2 <capital> ?e_1 . ?e_2 <pred:name> "Mughal Empire" . [ <pred:fact_h> ?e_2 ; <pred:fact_r> <capital> ; <pred:fact_t> ?e_1 ] <end_time> ?qpv . ?qpv <pred:year> 1540 .   }
Program:
function: Find
inputs: Mughal Empire
function: Relate
dependencies: 0
inputs: capital
forward
function: QFilterYear
dependencies: 1
inputs: end time
1540
=
function: FilterConcept
dependencies: 2
inputs: city
function: Relate
dependencies: 3
inputs: country
forward
function: FilterConcept
dependencies: 4
inputs: empire
function: Count
dependencies: 5