Question: Which historical country was the country of The Hague until 1581 and did not begin in 1832?
Choices: Swedish Empire
Mongol Empire
Crown of Aragón
Second French Empire
Confederate States of America
Abyssinia
Qing dynasty
Spanish Empire
First French Empire
Kingdom of Portugal
SPARQL: SELECT DISTINCT ?e WHERE { ?e <pred:instance_of> ?c . ?c <pred:name> "historical country" . ?e_1 <country> ?e . ?e_1 <pred:name> "The Hague" .  [ <pred:fact_h> ?e_1 ; <pred:fact_r> <country> ; <pred:fact_t> ?e ] <end_time> ?qpv . ?qpv <pred:year> 1581 . ?e <inception> ?pv . ?pv <pred:year> ?v . FILTER ( ?v != 1832 ) .  }
Program:
function: Find
inputs: The Hague
function: Relate
dependencies: 0
inputs: country
forward
function: QFilterYear
dependencies: 1
inputs: end time
1581
=
function: FilterConcept
dependencies: 2
inputs: historical country
function: FindAll
function: FilterYear
dependencies: 4
inputs: inception
1832
!=
function: FilterConcept
dependencies: 5
inputs: historical country
function: And
dependencies: 3
6
function: What
dependencies: 7
Answer: Spanish Empire