Simple Question (Direct)
Simple Question
Q15620
P1313
Q12737077
USER
Which occupation serves as the political office that is fulfilled by the head of the government of Esparreguera ?
(Q15620,P1313,c(Q12737077))
action filter_type
action find
entity Q15620
relation P1313
type Q12737077
['Q15620', 'P1313', {'concept': 'Q12737077'}]
SELECT DISTINCT ?m WHERE { resource:Q15620 property:P1313 ?m . ?m rdf:type ontology:Q12737077 }
Esparreguera
action filter_type
action find
entity Esparreguera
relation office held by head of government
type occupation
['Esparreguera', 'office held by head of government', {'concept': 'occupation'}]
SELECT DISTINCT ?m WHERE { resource:Esparreguera property:office_held_by_head_of_government ?m . ?m rdf:type ontology:occupation }
[]
occupation
Q26691715
SYSTEM
mayor of Esparraguera
Q26691715
(Q15620,P1313,c(Q12737077))
action filter_type
action find
entity Q15620
relation P1313
type Q12737077
The [ANSWER] serves as the political office that is fulfilled by the head of the government of Esparreguera
['Q15620', 'P1313', {'concept': 'Q12737077'}]
SELECT DISTINCT ?m WHERE { resource:Q15620 property:P1313 ?m . ?m rdf:type ontology:Q12737077 }
mayor of Esparraguera
The mayor of Esparraguera serves as the political office that is fulfilled by the head of the government of Esparreguera
mayor of Esparraguera
action filter_type
action find
entity Esparreguera
relation office held by head of government
type occupation
['Esparreguera', 'office held by head of government', {'concept': 'occupation'}]
SELECT DISTINCT ?m WHERE { resource:Esparreguera property:office_held_by_head_of_government ?m . ?m rdf:type ontology:occupation }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q15620
P47
Q1048835
USER
Which political territories have a shared border with Esparreguera ?
(Q15620,P47,c(Q1048835))
action filter_type
action find
entity Q15620
relation P47
type Q1048835
['Q15620', 'P47', {'concept': 'Q1048835'}]
SELECT DISTINCT ?c WHERE { resource:Q15620 property:P47 ?c . ?c rdf:type ontology:Q1048835 }
Esparreguera
action filter_type
action find
entity Esparreguera
relation shares border with
type political territorial entity
['Esparreguera', 'shares border with', {'concept': 'political territorial entity'}]
SELECT DISTINCT ?c WHERE { resource:Esparreguera property:shares_border_with ?c . ?c rdf:type ontology:political_territorial_entity }
[]
political territorial entity
Q15593 Q13945 Q15949
SYSTEM
Abrera, Vacarisses, Els Hostalets de Pierola
Q15600 Q15593 Q15949 Q13945 Q15626 Q16704
(Q15620,P47,c(Q1048835))
action filter_type
action find
entity Q15620
relation P47
type Q1048835
[ANSWERS] have a shared border with Esparreguera
['Q15620', 'P47', {'concept': 'Q1048835'}]
SELECT DISTINCT ?c WHERE { resource:Q15620 property:P47 ?c . ?c rdf:type ontology:Q1048835 }
Collbató Abrera Els Hostalets de Pierola Vacarisses Olesa de Montserrat Monistrol de Montserrat
Abrera, Vacarisses and Els Hostalets de Pierola have a shared border with Esparreguera
Abrera Vacarisses Els Hostalets de Pierola
action filter_type
action find
entity Esparreguera
relation shares border with
type political territorial entity
['Esparreguera', 'shares border with', {'concept': 'political territorial entity'}]
SELECT DISTINCT ?c WHERE { resource:Esparreguera property:shares_border_with ?c . ?c rdf:type ontology:political_territorial_entity }
[]
Simple Question (Ellipsis)
only subject is changed, parent and predicate remains same
Q956450
Q1048835
USER
And how about Fabara?
(Q956450,P47,c(Q1048835))
action filter_type
action find
entity Q956450
relation P47
type Q1048835
['Q956450', 'P47', {'concept': 'Q1048835'}]
SELECT DISTINCT ?k WHERE { resource:Q956450 property:P47 ?k . ?k rdf:type ontology:Q1048835 }
Fabara
action filter_type
action find
entity Fabara
relation shares border with
type political territorial entity
['Fabara', 'shares border with', {'concept': 'political territorial entity'}]
SELECT DISTINCT ?k WHERE { resource:Fabara property:shares_border_with ?k . ?k rdf:type ontology:political_territorial_entity }
[]
political territorial entity
Q837051 Q810755 Q956524
SYSTEM
Mequinenza, Batea, Tarragona, Maella
Q956524 Q810755 Q837051 Q1628416
(Q956450,P47,c(Q1048835))
action filter_type
action find
entity Q956450
relation P47
type Q1048835
[ANSWERS]
['Q956450', 'P47', {'concept': 'Q1048835'}]
SELECT DISTINCT ?k WHERE { resource:Q956450 property:P47 ?k . ?k rdf:type ontology:Q1048835 }
Maella Batea, Tarragona Mequinenza Nonaspe
Mequinenza Batea, Tarragona Maella
action filter_type
action find
entity Fabara
relation shares border with
type political territorial entity
['Fabara', 'shares border with', {'concept': 'political territorial entity'}]
SELECT DISTINCT ?k WHERE { resource:Fabara property:shares_border_with ?k . ?k rdf:type ontology:political_territorial_entity }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q671141 Q810755
P47
Q1048835
USER
Which political territories are adjacent to Batea, Tarragona or Izagre ?
OR((Q810755,P47,c(Q1048835)), (Q671141,P47,c(Q1048835)))
action filter_type
action union
action find
entity Q810755
relation P47
action find
entity Q671141
relation P47
type Q1048835
{'OR': [['Q810755', 'P47', {'concept': 'Q1048835'}], ['Q671141', 'P47', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?u WHERE { { { resource:Q671141 property:P47 ?u } UNION { resource:Q810755 property:P47 ?u } } . ?u rdf:type ontology:Q1048835 }
Izagre Batea, Tarragona
action filter_type
action union
action find
entity Batea, Tarragona
relation shares border with
action find
entity Izagre
relation shares border with
type political territorial entity
{'OR': [['Batea, Tarragona', 'shares border with', {'concept': 'political territorial entity'}], ['Izagre', 'shares border with', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?u WHERE { { { resource:Izagre property:shares_border_with ?u } UNION { resource:Batea,_Tarragona property:shares_border_with ?u } } . ?u rdf:type ontology:political_territorial_entity }
[]
political territorial entity
Q771963 Q1919601 Q1915094 Q138304 Q1233513 Q676746 Q1635235 Q589488 Q1921039 Q773369
SYSTEM
Some of them are Caseres, Saelices de Mayorga, Mayorga, Matanza, La Pobla de Massaluca, Vilalba dels Arcs, Joarilla de las Matas, Bot, Tarragona, Monasterio de Vega, Gandesa
Q1919601 Q771963 Q773369 Q956450 Q676746 Q1915094 Q1640137 Q1921039 Q589488 Q1233513 Q138304 Q1628416 Q1635235 Q956524
OR((Q810755,P47,c(Q1048835)), (Q671141,P47,c(Q1048835)))
action filter_type
action union
action find
entity Q810755
relation P47
action find
entity Q671141
relation P47
type Q1048835
[ANSWERS]
{'OR': [['Q810755', 'P47', {'concept': 'Q1048835'}], ['Q671141', 'P47', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?u WHERE { { { resource:Q671141 property:P47 ?u } UNION { resource:Q810755 property:P47 ?u } } . ?u rdf:type ontology:Q1048835 }
Saelices de Mayorga Caseres Gandesa Fabara Vilalba dels Arcs Mayorga Valverde-Enrique Monasterio de Vega Bot, Tarragona La Pobla de Massaluca Matanza Nonaspe Joarilla de las Matas Maella
Caseres, Saelices de Mayorga, Matanza, La Pobla de Massaluca, Vilalba dels Arcs, Joarilla de las Matas, Bot, Tarragona, Monasterio de Vega and Gandesa are adjacent to Batea, Tarragona or Izagre
Caseres Saelices de Mayorga Mayorga Matanza La Pobla de Massaluca Vilalba dels Arcs Joarilla de las Matas Bot, Tarragona Monasterio de Vega Gandesa
action filter_type
action union
action find
entity Batea, Tarragona
relation shares border with
action find
entity Izagre
relation shares border with
type political territorial entity
{'OR': [['Batea, Tarragona', 'shares border with', {'concept': 'political territorial entity'}], ['Izagre', 'shares border with', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?u WHERE { { { resource:Izagre property:shares_border_with ?u } UNION { resource:Batea,_Tarragona property:shares_border_with ?u } } . ?u rdf:type ontology:political_territorial_entity }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q16900162 Q956450
P17
Q15617994
USER
Which administrative territories do Fabara or Sierra de Montánchez belong to ?
OR((Q956450,P17,c(Q15617994)), (Q16900162,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q956450
relation P17
action find
entity Q16900162
relation P17
type Q15617994
{'OR': [['Q956450', 'P17', {'concept': 'Q15617994'}], ['Q16900162', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?n WHERE { { { resource:Q956450 property:P17 ?n } UNION { resource:Q16900162 property:P17 ?n } } . ?n rdf:type ontology:Q15617994 }
Sierra de Montánchez Fabara
action filter_type
action union
action find
entity Fabara
relation country
action find
entity Sierra de Montánchez
relation country
type designation for an administrative territorial entity
{'OR': [['Fabara', 'country', {'concept': 'designation for an administrative territorial entity'}], ['Sierra de Montánchez', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?n WHERE { { { resource:Fabara property:country ?n } UNION { resource:Sierra_de_Montánchez property:country ?n } } . ?n rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q29
SYSTEM
Spain
Q29
OR((Q956450,P17,c(Q15617994)), (Q16900162,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q956450
relation P17
action find
entity Q16900162
relation P17
type Q15617994
Fabara or Sierra de Montánchez belong to [ANSWER]
{'OR': [['Q956450', 'P17', {'concept': 'Q15617994'}], ['Q16900162', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?n WHERE { { { resource:Q956450 property:P17 ?n } UNION { resource:Q16900162 property:P17 ?n } } . ?n rdf:type ontology:Q15617994 }
Spain
Fabara or Sierra de Montánchez belong to Spain
Spain
action filter_type
action union
action find
entity Fabara
relation country
action find
entity Sierra de Montánchez
relation country
type designation for an administrative territorial entity
{'OR': [['Fabara', 'country', {'concept': 'designation for an administrative territorial entity'}], ['Sierra de Montánchez', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?n WHERE { { { resource:Fabara property:country ?n } UNION { resource:Sierra_de_Montánchez property:country ?n } } . ?n rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Verification (Boolean) (All)
Verification|3 entities, 2 direct, 2(direct) are query entities, subject is indirect
Q29 Q5854730 Q2807
P36
Q56061
USER
Does that administrative territory have Mian Mahalleh-ye Zakleh Bar and Madrid as its administrative centre ?
(Q29,P36,Q5854730) (Q29,P36,Q2807)
action is_in
entity Q29
action intersection
action find_reverse
entity Q5854730
relation P36
action find_reverse
entity Q2807
relation P36
['Q29', 'P36', 'Q5854730'] ['Q29', 'P36', 'Q2807']
ASK WHERE { resource:Q29 property:P36 resource:Q5854730 . resource:Q29 property:P36 resource:Q2807 }
Spain Mian Mahalleh-ye Zakleh Bar Madrid
action is_in
entity Spain
action intersection
action find_reverse
entity Mian Mahalleh-ye Zakleh Bar
relation capital
action find_reverse
entity Madrid
relation capital
['Spain', 'capital', 'Mian Mahalleh-ye Zakleh Bar'] ['Spain', 'capital', 'Madrid']
ASK WHERE { resource:Spain property:capital resource:Mian_Mahalleh-ye_Zakleh_Bar . resource:Spain property:capital resource:Madrid }
[]
administrative territorial entity
SYSTEM
NO and YES respectively
(Q29,P36,Q5854730) (Q29,P36,Q2807)
action is_in
entity Q29
action intersection
action find_reverse
entity Q5854730
relation P36
action find_reverse
entity Q2807
relation P36
[ANSWER]
['Q29', 'P36', 'Q5854730'] ['Q29', 'P36', 'Q2807']
ASK WHERE { resource:Q29 property:P36 resource:Q5854730 . resource:Q29 property:P36 resource:Q2807 }
NO and YES respectively
action is_in
entity Spain
action intersection
action find_reverse
entity Mian Mahalleh-ye Zakleh Bar
relation capital
action find_reverse
entity Madrid
relation capital
['Spain', 'capital', 'Mian Mahalleh-ye Zakleh Bar'] ['Spain', 'capital', 'Madrid']
ASK WHERE { resource:Spain property:capital resource:Mian_Mahalleh-ye_Zakleh_Bar . resource:Spain property:capital resource:Madrid }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q21966744 Q1233513
P47 P17
Q1048835
USER
Which political territories are bordered by La Pobla de Massaluca or are Kellys Knob a part of ?
OR((Q1233513,P47,c(Q1048835)), (Q21966744,P17,c(Q1048835)))
action filter_type
action union
action find
entity Q1233513
relation P47
action find
entity Q21966744
relation P17
type Q1048835
{'OR': [['Q1233513', 'P47', {'concept': 'Q1048835'}], ['Q21966744', 'P17', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?k WHERE { { { resource:Q21966744 property:P17 ?k } UNION { resource:Q1233513 property:P47 ?k } } . ?k rdf:type ontology:Q1048835 }
Kellys Knob La Pobla de Massaluca
action filter_type
action union
action find
entity La Pobla de Massaluca
relation shares border with
action find
entity Kellys Knob
relation country
type political territorial entity
{'OR': [['La Pobla de Massaluca', 'shares border with', {'concept': 'political territorial entity'}], ['Kellys Knob', 'country', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?k WHERE { { { resource:Kellys_Knob property:country ?k } UNION { resource:La_Pobla_de_Massaluca property:shares_border_with ?k } } . ?k rdf:type ontology:political_territorial_entity }
[]
political territorial entity
Q810755 Q1229607 Q1639270 Q1628416 Q676746 Q408
SYSTEM
Batea, Tarragona, Riba-roja d'Ebre, Fayón, Nonaspe, Vilalba dels Arcs, Australia
Q810755 Q1229607 Q1639270 Q1628416 Q676746 Q408
OR((Q1233513,P47,c(Q1048835)), (Q21966744,P17,c(Q1048835)))
action filter_type
action union
action find
entity Q1233513
relation P47
action find
entity Q21966744
relation P17
type Q1048835
[ANSWERS] are bordered by La Pobla de Massaluca or are Kellys Knob a part of
{'OR': [['Q1233513', 'P47', {'concept': 'Q1048835'}], ['Q21966744', 'P17', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?k WHERE { { { resource:Q21966744 property:P17 ?k } UNION { resource:Q1233513 property:P47 ?k } } . ?k rdf:type ontology:Q1048835 }
Batea, Tarragona Riba-roja d'Ebre Fayón Nonaspe Vilalba dels Arcs Australia
Batea, Tarragona, Riba-roja d'Ebre, Fayón, Nonaspe, Vilalba dels Arcs and Australia are bordered by La Pobla de Massaluca or are Kellys Knob a part of
Batea, Tarragona Riba-roja d'Ebre Fayón Nonaspe Vilalba dels Arcs Australia
action filter_type
action union
action find
entity La Pobla de Massaluca
relation shares border with
action find
entity Kellys Knob
relation country
type political territorial entity
{'OR': [['La Pobla de Massaluca', 'shares border with', {'concept': 'political territorial entity'}], ['Kellys Knob', 'country', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?k WHERE { { { resource:Kellys_Knob property:country ?k } UNION { resource:La_Pobla_de_Massaluca property:shares_border_with ?k } } . ?k rdf:type ontology:political_territorial_entity }
[]