Simple Question (Direct)
Simple Question
Q16186861
P21
Q290
USER
What is the sex of Walfredo Reyes, Jr. ?
(Q16186861,P21,c(Q290))
action filter_type
action find
entity Q16186861
relation P21
type Q290
['Q16186861', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?l WHERE { resource:Q16186861 property:P21 ?l . ?l rdf:type ontology:Q290 }
Walfredo Reyes, Jr.
action filter_type
action find
entity Walfredo Reyes, Jr.
relation gender
type sex
['Walfredo Reyes, Jr.', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?l WHERE { resource:Walfredo_Reyes,_Jr. property:gender ?l . ?l rdf:type ontology:sex }
[]
sex
Q6581097
SYSTEM
male
Q6581097
(Q16186861,P21,c(Q290))
action filter_type
action find
entity Q16186861
relation P21
type Q290
The sex of Walfredo Reyes , Jr. is the [ANSWER]
['Q16186861', 'P21', {'concept': 'Q290'}]
SELECT DISTINCT ?l WHERE { resource:Q16186861 property:P21 ?l . ?l rdf:type ontology:Q290 }
male
The sex of Walfredo Reyes , Jr. is the male
male
action filter_type
action find
entity Walfredo Reyes, Jr.
relation gender
type sex
['Walfredo Reyes, Jr.', 'gender', {'concept': 'sex'}]
SELECT DISTINCT ?l WHERE { resource:Walfredo_Reyes,_Jr. property:gender ?l . ?l rdf:type ontology:sex }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q11548209 Q16186861
P27
Q15617994
USER
Which administrative territories are the native countriesof Walfredo Reyes, Jr. or Yoshio Mizukami ?
OR((Q16186861,P27,c(Q15617994)), (Q11548209,P27,c(Q15617994)))
action filter_type
action union
action find
entity Q16186861
relation P27
action find
entity Q11548209
relation P27
type Q15617994
{'OR': [['Q16186861', 'P27', {'concept': 'Q15617994'}], ['Q11548209', 'P27', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?l WHERE { { VALUES ( ?p ) { ( resource:Q16186861 ) ( resource:Q11548209 ) } . ?p property:P27 ?l } . ?l rdf:type ontology:Q15617994 }
Yoshio Mizukami Walfredo Reyes, Jr.
action filter_type
action union
action find
entity Walfredo Reyes, Jr.
relation country of citizenship
action find
entity Yoshio Mizukami
relation country of citizenship
type designation for an administrative territorial entity
{'OR': [['Walfredo Reyes, Jr.', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}], ['Yoshio Mizukami', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?l WHERE { { VALUES ( ?p ) { ( resource:Walfredo_Reyes,_Jr. ) ( resource:Yoshio_Mizukami ) } . ?p property:country_of_citizenship ?l } . ?l rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q241 Q17 Q30
SYSTEM
Cuba, Japan, United States of America
Q241 Q17 Q30
OR((Q16186861,P27,c(Q15617994)), (Q11548209,P27,c(Q15617994)))
action filter_type
action union
action find
entity Q16186861
relation P27
action find
entity Q11548209
relation P27
type Q15617994
[ANSWERS] are the native countriesof Walfredo Reyes, Jr. or Yoshio Mizukami
{'OR': [['Q16186861', 'P27', {'concept': 'Q15617994'}], ['Q11548209', 'P27', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?l WHERE { { VALUES ( ?p ) { ( resource:Q16186861 ) ( resource:Q11548209 ) } . ?p property:P27 ?l } . ?l rdf:type ontology:Q15617994 }
Cuba Japan United States of America
Cuba, Japan and United States of America are the native countriesof Walfredo Reyes, Jr. or Yoshio Mizukami
Cuba Japan United States of America
action filter_type
action union
action find
entity Walfredo Reyes, Jr.
relation country of citizenship
action find
entity Yoshio Mizukami
relation country of citizenship
type designation for an administrative territorial entity
{'OR': [['Walfredo Reyes, Jr.', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}], ['Yoshio Mizukami', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?l WHERE { { VALUES ( ?p ) { ( resource:Walfredo_Reyes,_Jr. ) ( resource:Yoshio_Mizukami ) } . ?p property:country_of_citizenship ?l } . ?l rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Verification (Boolean) (All)
Verification|one entity, multiple entities (as object) referred indirectly
Q4726388
P530
Q15617994
USER
Do Alief Independent School District have tactful political relations with those ones ?
(Q4726388,P530,Q241) (Q4726388,P530,Q17) (Q4726388,P530,Q30)
action is_in
entity prev_answer
action find
entity Q4726388
relation P530
['Q4726388', 'P530', 'Q241'] ['Q4726388', 'P530', 'Q17'] ['Q4726388', 'P530', 'Q30']
ASK WHERE { resource:Q4726388 property:P530 ?h . VALUES ( ?h ) { ( resource:Q241 ) ( resource:Q17 ) ( resource:Q30 ) } }
Alief Independent School District
action is_in
entity prev_answer
action find
entity Alief Independent School District
relation diplomatic relation
['Alief Independent School District', 'diplomatic relation', 'Cuba'] ['Alief Independent School District', 'diplomatic relation', 'Japan'] ['Alief Independent School District', 'diplomatic relation', 'United States of America']
ASK WHERE { resource:Alief_Independent_School_District property:diplomatic_relation ?h . VALUES ( ?h ) { ( resource:Cuba ) ( resource:Japan ) ( resource:United_States_of_America ) } }
[]
designation for an administrative territorial entity
SYSTEM
NO
(Q4726388,P530,Q241) (Q4726388,P530,Q17) (Q4726388,P530,Q30)
action is_in
entity prev_answer
action find
entity Q4726388
relation P530
[ANSWER]
['Q4726388', 'P530', 'Q241'] ['Q4726388', 'P530', 'Q17'] ['Q4726388', 'P530', 'Q30']
ASK WHERE { resource:Q4726388 property:P530 ?h . VALUES ( ?h ) { ( resource:Q241 ) ( resource:Q17 ) ( resource:Q30 ) } }
No
action is_in
entity prev_answer
action find
entity Alief Independent School District
relation diplomatic relation
['Alief Independent School District', 'diplomatic relation', 'Cuba'] ['Alief Independent School District', 'diplomatic relation', 'Japan'] ['Alief Independent School District', 'diplomatic relation', 'United States of America']
ASK WHERE { resource:Alief_Independent_School_District property:diplomatic_relation ?h . VALUES ( ?h ) { ( resource:Cuba ) ( resource:Japan ) ( resource:United_States_of_America ) } }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q1490
P1376
Q3024240
USER
Which former country has Tokyo has its center of administration ?
(Q1490,P1376,c(Q3024240))
action filter_type
action find
entity Q1490
relation P1376
type Q3024240
['Q1490', 'P1376', {'concept': 'Q3024240'}]
SELECT DISTINCT ?y WHERE { resource:Q1490 property:P1376 ?y . ?y rdf:type ontology:Q3024240 }
Tokyo
action filter_type
action find
entity Tokyo
relation capital of
type former country
['Tokyo', 'capital of', {'concept': 'former country'}]
SELECT DISTINCT ?y WHERE { resource:Tokyo property:capital_of ?y . ?y rdf:type ontology:former_country }
[]
former country
Q188712
SYSTEM
Empire of Japan
Q188712
(Q1490,P1376,c(Q3024240))
action filter_type
action find
entity Q1490
relation P1376
type Q3024240
[ANSWER] has Tokyo has its center of administration
['Q1490', 'P1376', {'concept': 'Q3024240'}]
SELECT DISTINCT ?y WHERE { resource:Q1490 property:P1376 ?y . ?y rdf:type ontology:Q3024240 }
Empire of Japan
Empire of Japan has Tokyo has its center of administration
Empire of Japan
action filter_type
action find
entity Tokyo
relation capital of
type former country
['Tokyo', 'capital of', {'concept': 'former country'}]
SELECT DISTINCT ?y WHERE { resource:Tokyo property:capital_of ?y . ?y rdf:type ontology:former_country }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q1490
P36
Q515
USER
Which city is associated to that administrative territory as the capital ?
(Q188712,P36,c(Q515))
action filter_type
action find
entity Q1490
relation P36
type Q515
['Q188712', 'P36', {'concept': 'Q515'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:Q515 . resource:Q1490 property:P36 ?z }
Tokyo
action filter_type
action find
entity Tokyo
relation capital
type city
['Empire of Japan', 'capital', {'concept': 'city'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:city . resource:Tokyo property:capital ?z }
[]
city
Q7473516
SYSTEM
Tokyo
Q7473516
(Q188712,P36,c(Q515))
action filter_type
action find
entity Q1490
relation P36
type Q515
[ANSWER] is associated to that administrative territory as the capital
['Q188712', 'P36', {'concept': 'Q515'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:Q515 . resource:Q1490 property:P36 ?z }
Tokyo
Tokyo is associated to that administrative territory as the capital
Tokyo
action filter_type
action find
entity Tokyo
relation capital
type city
['Empire of Japan', 'capital', {'concept': 'city'}]
SELECT DISTINCT ?z WHERE { ?z rdf:type ontology:city . resource:Tokyo property:capital ?z }
[]
Comparative Reasoning (Count) (All)
Comparative|Count over More/Less|Single entity type|Indirect
P206
Q1267889 Q515
USER
How many cities are located in the neighbourhood of approximately the same number of waterways as that city ?
(c(Q515),P206,c(Q1267889))
action count
action approx
action find_tuple_counts
relation P206
type Q515
type Q1267889
action count
action filter_type
action find
entity Q7473516
relation P206
type Q515
[{'concept': 'Q515'}, 'P206', {'concept': 'Q1267889'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?b ) WHERE { { SELECT DISTINCT ?z ( COUNT ( ?l ) AS ?n ) WHERE { ?z property:P206 ?l . ?z rdf:type ontology:Q515 . ?l rdf:type ontology:Q1267889 } GROUP BY ?z } . { SELECT DISTINCT ( COUNT ( ?p ) AS ?i ) WHERE { resource:Q7473516 property:P206 ?p . ?p rdf:type ontology:Q515 } } . FILTER ( ?n = ?i ) }
action count
action approx
action find_tuple_counts
relation located next to body of water
type city
type waterway
action count
action filter_type
action find
entity Tokyo
relation located next to body of water
type city
[{'concept': 'city'}, 'located next to body of water', {'concept': 'waterway'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?b ) WHERE { { SELECT DISTINCT ?z ( COUNT ( ?l ) AS ?n ) WHERE { ?z property:located_next_to_body_of_water ?l . ?z rdf:type ontology:city . ?l rdf:type ontology:waterway } GROUP BY ?z } . { SELECT DISTINCT ( COUNT ( ?p ) AS ?i ) WHERE { resource:Tokyo property:located_next_to_body_of_water ?p . ?p rdf:type ontology:city } } . FILTER ( ?n = ?i ) }
[]
waterway city
SYSTEM
97
Q1410 Q3075 Q1794 Q1863 Q1865 Q1519 Q496499 Q3974 Q846877 Q19689 Q1486 Q2966 Q34217 Q496479 Q602903 Q3004 Q1461 Q488869 Q217432 Q827041 Q3572 Q623549 Q2865 Q4024 Q1711 Q2978 Q3806 Q2973 Q34261 Q3014 Q1773 Q1844 Q14821 Q819587 Q3958 Q3955 Q23430 Q633272 Q2773 Q612815 Q320943 Q1858 Q633935 Q320416 Q7473516 Q1761 Q890122 Q4007 Q2706 Q7070 Q653545 Q8684 Q270704 Q41474 Q2749 Q4174 Q4346 Q3838 Q2833 Q1209 Q3931 Q3751 Q3750 Q3200 Q3126 Q3042 Q157835 Q3046 Q847550 Q3936 Q2936 Q646780 Q3214 Q2100 Q1533 Q1530 Q1731 Q1953 Q5838 Q7027 Q3857 Q3994 Q19660 Q11194 Q3915 Q2119 Q3069 Q1720 Q1721 Q329996 Q3904 Q695920 Q2910 Q3861 Q1899 Q2999 Q2844
(c(Q515),P206,c(Q1267889))
action count
action approx
action find_tuple_counts
relation P206
type Q515
type Q1267889
action count
action filter_type
action find
entity Q7473516
relation P206
type Q515
[ANSWER]
[{'concept': 'Q515'}, 'P206', {'concept': 'Q1267889'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?b ) WHERE { { SELECT DISTINCT ?z ( COUNT ( ?l ) AS ?n ) WHERE { ?z property:P206 ?l . ?z rdf:type ontology:Q515 . ?l rdf:type ontology:Q1267889 } GROUP BY ?z } . { SELECT DISTINCT ( COUNT ( ?p ) AS ?i ) WHERE { resource:Q7473516 property:P206 ?p . ?p rdf:type ontology:Q515 } } . FILTER ( ?n = ?i ) }
Gibraltar Fürth Frankfurt Andorra la Vella Kuala Lumpur Abu Dhabi Kazuno Landshut Semboku Tirana Buenos Aires Heidelberg Oxford Yokote Yurihonjō Ingolstadt Manila Benalmádena Port Harcourt Beroun Tunis Puerto de la Cruz Kassel Frankfurt (Oder) Potsdam Regensburg Tübingen Darmstadt Port-au-Prince Wolfsburg Riga Vaduz Coburg Noshiro Neubrandenburg Weimar Ulaanbaatar Yuzawa Braunschweig Garachico Matsudo Hanoi Oga Tartessos Tokyo Dublin Bolhrad Rosenheim Bremerhaven Eisenach Kita-Akita Seoul Třebíč Kingstown Augsburg Emden Waren (Müritz) Kinshasa Freiburg im Breisgau Free Hanseatic City of Bremen Brandenburg an der Havel Praia Gera Salzgitter Erlangen Offenbach am Main Zaporizhzhya Pforzheim Nikaho Bamberg Oldenburg Katagami Cottbus Duisburg Caracas Baghdad Dresden Yerevan Kabul Straubing Wilhelmshaven Kempten Bucharest Sarajevo Antananarivo Mannheim Bottrop Mainz Wiesbaden Ōdate Mbabane Daisen Ludwigshafen Doha Kyiv Würzburg Brasília
97
action count
action approx
action find_tuple_counts
relation located next to body of water
type city
type waterway
action count
action filter_type
action find
entity Tokyo
relation located next to body of water
type city
[{'concept': 'city'}, 'located next to body of water', {'concept': 'waterway'}]
SELECT DISTINCT ( COUNT ( ?z ) AS ?b ) WHERE { { SELECT DISTINCT ?z ( COUNT ( ?l ) AS ?n ) WHERE { ?z property:located_next_to_body_of_water ?l . ?z rdf:type ontology:city . ?l rdf:type ontology:waterway } GROUP BY ?z } . { SELECT DISTINCT ( COUNT ( ?p ) AS ?i ) WHERE { resource:Tokyo property:located_next_to_body_of_water ?p . ?p rdf:type ontology:city } } . FILTER ( ?n = ?i ) }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P190
Q515 Q20667921 Q1048835
USER
Which cities are twin cities of max number of french administrative divisions or political territories ?
(c(Q20667921)|c(Q1048835),P190,c(Q515))
action argmax
action union
action find_reverse_tuple_counts
relation P190
type Q515
type Q20667921
action find_reverse_tuple_counts
relation P190
type Q515
type Q1048835
[[{'concept': 'Q20667921'}, {'concept': 'Q1048835'}], 'P190', {'concept': 'Q515'}]
SELECT DISTINCT ?i WHERE { { SELECT DISTINCT ( MAX ( ?o ) AS ?z ) { SELECT DISTINCT ?j ( COUNT ( ?d ) AS ?o ) WHERE { VALUES ( ?v ) { ( ontology:Q20667921 ) ( ontology:Q1048835 ) } . ?d rdf:type ?v } GROUP BY ?j } } . FILTER ( ?u = ?z ) . { SELECT DISTINCT ?i ( COUNT ( ?n ) AS ?u ) WHERE { { ?i rdf:type ontology:Q515 . ?n rdf:type ontology:Q20667921 . ?n property:P190 ?i } UNION { ?n rdf:type ontology:Q1048835 . ?i rdf:type ontology:Q515 . ?n property:P190 ?i } } GROUP BY ?i } }
action argmax
action union
action find_reverse_tuple_counts
relation sister city
type city
type type of french administrative division
action find_reverse_tuple_counts
relation sister city
type city
type political territorial entity
[[{'concept': 'type of french administrative division'}, {'concept': 'political territorial entity'}], 'sister city', {'concept': 'city'}]
SELECT DISTINCT ?i WHERE { { SELECT DISTINCT ( MAX ( ?o ) AS ?z ) { SELECT DISTINCT ?j ( COUNT ( ?d ) AS ?o ) WHERE { VALUES ( ?v ) { ( ontology:type_of_french_administrative_division ) ( ontology:political_territorial_entity ) } . ?d rdf:type ?v } GROUP BY ?j } } . FILTER ( ?u = ?z ) . { SELECT DISTINCT ?i ( COUNT ( ?n ) AS ?u ) WHERE { { ?i rdf:type ontology:city . ?n rdf:type ontology:type_of_french_administrative_division . ?n property:sister_city ?i } UNION { ?n rdf:type ontology:political_territorial_entity . ?i rdf:type ontology:city . ?n property:sister_city ?i } } GROUP BY ?i } }
[]
city type of french administrative division political territorial entity
Q3104 Q485581 Q1863
SYSTEM
Koblenz, Aveiro, Andorra la Vella
Q3104 Q485581 Q1863
(c(Q20667921)|c(Q1048835),P190,c(Q515))
action argmax
action union
action find_reverse_tuple_counts
relation P190
type Q515
type Q20667921
action find_reverse_tuple_counts
relation P190
type Q515
type Q1048835
[ANSWERS] are twin cities of max number of french administrative divisions or political territories
[[{'concept': 'Q20667921'}, {'concept': 'Q1048835'}], 'P190', {'concept': 'Q515'}]
SELECT DISTINCT ?i WHERE { { SELECT DISTINCT ( MAX ( ?o ) AS ?z ) { SELECT DISTINCT ?j ( COUNT ( ?d ) AS ?o ) WHERE { VALUES ( ?v ) { ( ontology:Q20667921 ) ( ontology:Q1048835 ) } . ?d rdf:type ?v } GROUP BY ?j } } . FILTER ( ?u = ?z ) . { SELECT DISTINCT ?i ( COUNT ( ?n ) AS ?u ) WHERE { { ?i rdf:type ontology:Q515 . ?n rdf:type ontology:Q20667921 . ?n property:P190 ?i } UNION { ?n rdf:type ontology:Q1048835 . ?i rdf:type ontology:Q515 . ?n property:P190 ?i } } GROUP BY ?i } }
Koblenz Aveiro Andorra la Vella
Koblenz, Aveiro and Andorra la Vella are twin cities of max number of french administrative divisions or political territories
Koblenz Aveiro Andorra la Vella
action argmax
action union
action find_reverse_tuple_counts
relation sister city
type city
type type of french administrative division
action find_reverse_tuple_counts
relation sister city
type city
type political territorial entity
[[{'concept': 'type of french administrative division'}, {'concept': 'political territorial entity'}], 'sister city', {'concept': 'city'}]
SELECT DISTINCT ?i WHERE { { SELECT DISTINCT ( MAX ( ?o ) AS ?z ) { SELECT DISTINCT ?j ( COUNT ( ?d ) AS ?o ) WHERE { VALUES ( ?v ) { ( ontology:type_of_french_administrative_division ) ( ontology:political_territorial_entity ) } . ?d rdf:type ?v } GROUP BY ?j } } . FILTER ( ?u = ?z ) . { SELECT DISTINCT ?i ( COUNT ( ?n ) AS ?u ) WHERE { { ?i rdf:type ontology:city . ?n rdf:type ontology:type_of_french_administrative_division . ?n property:sister_city ?i } UNION { ?n rdf:type ontology:political_territorial_entity . ?i rdf:type ontology:city . ?n property:sister_city ?i } } GROUP BY ?i } }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Single entity type
P1376
Q1048835 Q515
USER
Which political territories have max number of cities as their county seat ?
(c(Q515),P1376,Q188732)
action argmax
action find_reverse_tuple_counts
relation P1376
type Q1048835
type Q515
[{'concept': 'Q515'}, 'P1376', 'Q188732']
SELECT DISTINCT ?a WHERE { { SELECT DISTINCT ( MAX ( ?r ) AS ?i ) { SELECT DISTINCT ?e ( COUNT ( ?l ) AS ?r ) WHERE { ?e rdf:type ontology:Q1048835 . ?l rdf:type ontology:Q515 . ?l property:P1376 ?e } GROUP BY ?e } } . { SELECT DISTINCT ?a ( COUNT ( ?k ) AS ?s ) WHERE { ?a rdf:type ontology:Q1048835 . ?k rdf:type ontology:Q515 . ?k property:P1376 ?a } GROUP BY ?a } . FILTER ( ?s = ?i ) }
action argmax
action find_reverse_tuple_counts
relation capital of
type political territorial entity
type city
[{'concept': 'city'}, 'capital of', 'Gomel Region']
SELECT DISTINCT ?a WHERE { { SELECT DISTINCT ( MAX ( ?r ) AS ?i ) { SELECT DISTINCT ?e ( COUNT ( ?l ) AS ?r ) WHERE { ?e rdf:type ontology:political_territorial_entity . ?l rdf:type ontology:city . ?l property:capital_of ?e } GROUP BY ?e } } . { SELECT DISTINCT ?a ( COUNT ( ?k ) AS ?s ) WHERE { ?a rdf:type ontology:political_territorial_entity . ?k rdf:type ontology:city . ?k property:capital_of ?a } GROUP BY ?a } . FILTER ( ?s = ?i ) }
[]
political territorial entity city
Q22880
SYSTEM
Electoral Palatinate
Q22880
(c(Q515),P1376,Q188732)
action argmax
action find_reverse_tuple_counts
relation P1376
type Q1048835
type Q515
[ANSWER] have max number of cities as their county seat
[{'concept': 'Q515'}, 'P1376', 'Q188732']
SELECT DISTINCT ?a WHERE { { SELECT DISTINCT ( MAX ( ?r ) AS ?i ) { SELECT DISTINCT ?e ( COUNT ( ?l ) AS ?r ) WHERE { ?e rdf:type ontology:Q1048835 . ?l rdf:type ontology:Q515 . ?l property:P1376 ?e } GROUP BY ?e } } . { SELECT DISTINCT ?a ( COUNT ( ?k ) AS ?s ) WHERE { ?a rdf:type ontology:Q1048835 . ?k rdf:type ontology:Q515 . ?k property:P1376 ?a } GROUP BY ?a } . FILTER ( ?s = ?i ) }
Electoral Palatinate
Electoral Palatinate have max number of cities as their county seat
Electoral Palatinate
action argmax
action find_reverse_tuple_counts
relation capital of
type political territorial entity
type city
[{'concept': 'city'}, 'capital of', 'Gomel Region']
SELECT DISTINCT ?a WHERE { { SELECT DISTINCT ( MAX ( ?r ) AS ?i ) { SELECT DISTINCT ?e ( COUNT ( ?l ) AS ?r ) WHERE { ?e rdf:type ontology:political_territorial_entity . ?l rdf:type ontology:city . ?l property:capital_of ?e } GROUP BY ?e } } . { SELECT DISTINCT ?a ( COUNT ( ?k ) AS ?s ) WHERE { ?a rdf:type ontology:political_territorial_entity . ?k rdf:type ontology:city . ?k property:capital_of ?a } GROUP BY ?a } . FILTER ( ?s = ?i ) }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q22880
P138
Q17444909
USER
Which astronomical object type has that political territory as its namesake ?
(c(Q17444909),P138,Q22880)
action filter_type
action find_reverse
entity Q22880
relation P138
type Q17444909
[{'concept': 'Q17444909'}, 'P138', 'Q22880']
SELECT DISTINCT ?i WHERE { ?i rdf:type ontology:Q17444909 . ?i property:P138 resource:Q22880 }
Electoral Palatinate
action filter_type
action find_reverse
entity Electoral Palatinate
relation named after
type astronomical object type
[{'concept': 'astronomical object type'}, 'named after', 'Electoral Palatinate']
SELECT DISTINCT ?i WHERE { ?i rdf:type ontology:astronomical_object_type . ?i property:named_after resource:Electoral_Palatinate }
[]
astronomical object type
Q152790
SYSTEM
415 Palatia
Q152790
(c(Q17444909),P138,Q22880)
action filter_type
action find_reverse
entity Q22880
relation P138
type Q17444909
[ANSWER] has that political territory as its namesake
[{'concept': 'Q17444909'}, 'P138', 'Q22880']
SELECT DISTINCT ?i WHERE { ?i rdf:type ontology:Q17444909 . ?i property:P138 resource:Q22880 }
415 Palatia
415 Palatia has that political territory as its namesake
415 Palatia
action filter_type
action find_reverse
entity Electoral Palatinate
relation named after
type astronomical object type
[{'concept': 'astronomical object type'}, 'named after', 'Electoral Palatinate']
SELECT DISTINCT ?i WHERE { ?i rdf:type ontology:astronomical_object_type . ?i property:named_after resource:Electoral_Palatinate }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q70141 Q485581
P47
Q13220204
USER
Which administrative country subdivisions have a shared border with Aveiro or Balerna ?
OR((Q485581,P47,c(Q13220204)), (Q70141,P47,c(Q13220204)))
action filter_type
action union
action find
entity Q485581
relation P47
action find
entity Q70141
relation P47
type Q13220204
{'OR': [['Q485581', 'P47', {'concept': 'Q13220204'}], ['Q70141', 'P47', {'concept': 'Q13220204'}]]}
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:Q13220204 . { { resource:Q70141 property:P47 ?u } UNION { resource:Q485581 property:P47 ?u } } }
Balerna Aveiro
action filter_type
action union
action find
entity Aveiro
relation shares border with
action find
entity Balerna
relation shares border with
type second-level administrative country subdivision
{'OR': [['Aveiro', 'shares border with', {'concept': 'second-level administrative country subdivision'}], ['Balerna', 'shares border with', {'concept': 'second-level administrative country subdivision'}]]}
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:second-level_administrative_country_subdivision . { { resource:Balerna property:shares_border_with ?u } UNION { resource:Aveiro property:shares_border_with ?u } } }
[]
second-level administrative country subdivision
Q67872 Q70143 Q404220 Q68111 Q67738 Q405241 Q249906
SYSTEM
Castel San Pietro, Morbio Inferiore, Vagos Municipality, Chiasso, Coldrerio, Oliveira do Bairro Municipality, Águeda Municipality
Q67872 Q70143 Q404220 Q68111 Q67738 Q405241 Q249906
OR((Q485581,P47,c(Q13220204)), (Q70141,P47,c(Q13220204)))
action filter_type
action union
action find
entity Q485581
relation P47
action find
entity Q70141
relation P47
type Q13220204
[ANSWERS] have a shared border with Aveiro or Balerna
{'OR': [['Q485581', 'P47', {'concept': 'Q13220204'}], ['Q70141', 'P47', {'concept': 'Q13220204'}]]}
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:Q13220204 . { { resource:Q70141 property:P47 ?u } UNION { resource:Q485581 property:P47 ?u } } }
Castel San Pietro Morbio Inferiore Vagos Municipality Chiasso Coldrerio Oliveira do Bairro Municipality Águeda Municipality
Castel San Pietro, Morbio Inferiore, Vagos Municipality, Chiasso, Coldrerio, Oliveira do Bairro Municipality and Águeda Municipality have a shared border with Aveiro or Balerna
Castel San Pietro Morbio Inferiore Vagos Municipality Chiasso Coldrerio Oliveira do Bairro Municipality Águeda Municipality
action filter_type
action union
action find
entity Aveiro
relation shares border with
action find
entity Balerna
relation shares border with
type second-level administrative country subdivision
{'OR': [['Aveiro', 'shares border with', {'concept': 'second-level administrative country subdivision'}], ['Balerna', 'shares border with', {'concept': 'second-level administrative country subdivision'}]]}
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:second-level_administrative_country_subdivision . { { resource:Balerna property:shares_border_with ?u } UNION { resource:Aveiro property:shares_border_with ?u } } }
[]