Simple Question (Direct)
Simple Question
Q17151207
P54
Q1194951
USER
What is Shawky El Said a member of ?
(Q17151207,P54,c(Q1194951))
action filter_type
action find
entity Q17151207
relation P54
type Q1194951
['Q17151207', 'P54', {'concept': 'Q1194951'}]
SELECT DISTINCT ?u WHERE { resource:Q17151207 property:P54 ?u . ?u rdf:type ontology:Q1194951 }
Shawky El Said
action filter_type
action find
entity Shawky El Said
relation member of sports team
type national sports team
['Shawky El Said', 'member of sports team', {'concept': 'national sports team'}]
SELECT DISTINCT ?u WHERE { resource:Shawky_El_Said property:member_of_sports_team ?u . ?u rdf:type ontology:national_sports_team }
[]
national sports team
Q28089
SYSTEM
Egypt national football team
Q28089
(Q17151207,P54,c(Q1194951))
action filter_type
action find
entity Q17151207
relation P54
type Q1194951
Shawky El Said a member of is [ANSWER]
['Q17151207', 'P54', {'concept': 'Q1194951'}]
SELECT DISTINCT ?u WHERE { resource:Q17151207 property:P54 ?u . ?u rdf:type ontology:Q1194951 }
Egypt national football team
Shawky El Said a member of is Egypt national football team
Egypt national football team
action filter_type
action find
entity Shawky El Said
relation member of sports team
type national sports team
['Shawky El Said', 'member of sports team', {'concept': 'national sports team'}]
SELECT DISTINCT ?u WHERE { resource:Shawky_El_Said property:member_of_sports_team ?u . ?u rdf:type ontology:national_sports_team }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q17151207
P641
Q349
USER
Which sport did Shawky El Said participate in ?
(Q17151207,P641,c(Q349))
action filter_type
action find
entity Q17151207
relation P641
type Q349
['Q17151207', 'P641', {'concept': 'Q349'}]
SELECT DISTINCT ?l WHERE { ?l rdf:type ontology:Q349 . resource:Q17151207 property:P641 ?l }
Shawky El Said
action filter_type
action find
entity Shawky El Said
relation sport
type sport
['Shawky El Said', 'sport', {'concept': 'sport'}]
SELECT DISTINCT ?l WHERE { ?l rdf:type ontology:sport . resource:Shawky_El_Said property:sport ?l }
[]
sport
Q2736
SYSTEM
association football
Q2736
(Q17151207,P641,c(Q349))
action filter_type
action find
entity Q17151207
relation P641
type Q349
Shawky El Said participated in [ANSWER]
['Q17151207', 'P641', {'concept': 'Q349'}]
SELECT DISTINCT ?l WHERE { ?l rdf:type ontology:Q349 . resource:Q17151207 property:P641 ?l }
association football
Shawky El Said participated in association football
association football
action filter_type
action find
entity Shawky El Said
relation sport
type sport
['Shawky El Said', 'sport', {'concept': 'sport'}]
SELECT DISTINCT ?l WHERE { ?l rdf:type ontology:sport . resource:Shawky_El_Said property:sport ?l }
[]
Simple Question (Ellipsis)
only subject is changed, parent and predicate remains same
Q4717704
Q349
USER
And what about Alex Rollo?
(Q4717704,P641,c(Q349))
action filter_type
action find
entity Q4717704
relation P641
type Q349
['Q4717704', 'P641', {'concept': 'Q349'}]
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:Q349 . resource:Q4717704 property:P641 ?u }
Alex Rollo
action filter_type
action find
entity Alex Rollo
relation sport
type sport
['Alex Rollo', 'sport', {'concept': 'sport'}]
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:sport . resource:Alex_Rollo property:sport ?u }
[]
sport
Q2736
SYSTEM
association football
Q2736
(Q4717704,P641,c(Q349))
action filter_type
action find
entity Q4717704
relation P641
type Q349
[ANSWER]
['Q4717704', 'P641', {'concept': 'Q349'}]
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:Q349 . resource:Q4717704 property:P641 ?u }
association football
association football
action filter_type
action find
entity Alex Rollo
relation sport
type sport
['Alex Rollo', 'sport', {'concept': 'sport'}]
SELECT DISTINCT ?u WHERE { ?u rdf:type ontology:sport . resource:Alex_Rollo property:sport ?u }
[]
Verification (Boolean) (All)
Verification|2 entities, one direct and one indirect, object is indirect
Q2736 Q6850869
P641
Q502895
USER
Is Milcho Tanev associated with playing that sport ?
(Q6850869,P641,Q2736)
action is_in
entity Q2736
action find
entity Q6850869
relation P641
['Q6850869', 'P641', 'Q2736']
ASK WHERE { resource:Q6850869 property:P641 resource:Q2736 }
association football Milcho Tanev
action is_in
entity association football
action find
entity Milcho Tanev
relation sport
['Milcho Tanev', 'sport', 'association football']
ASK WHERE { resource:Milcho_Tanev property:sport resource:association_football }
[]
common name
SYSTEM
YES
(Q6850869,P641,Q2736)
action is_in
entity Q2736
action find
entity Q6850869
relation P641
[ANSWER]
['Q6850869', 'P641', 'Q2736']
ASK WHERE { resource:Q6850869 property:P641 resource:Q2736 }
Yes
action is_in
entity association football
action find
entity Milcho Tanev
relation sport
['Milcho Tanev', 'sport', 'association football']
ASK WHERE { resource:Milcho_Tanev property:sport resource:association_football }
[]
Comparative Reasoning (All)
Comparative|More/Less|Single entity type
Q1300012
P1303
Q34379 Q502895
USER
Which musical instruments are played by greater number of people than toy piano ?
(c(Q502895),P1303,c(Q34379))
action greater
action find_reverse_tuple_counts
relation P1303
type Q34379
type Q502895
action count
action filter_type
action find
entity Q1300012
relation P1303
type Q34379
[{'concept': 'Q502895'}, 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ?y WHERE { { SELECT DISTINCT ?y ( COUNT ( ?w ) AS ?x ) WHERE { ?w property:P1303 ?y . ?y rdf:type ontology:Q34379 . ?w rdf:type ontology:Q502895 } GROUP BY ?y } . { SELECT DISTINCT ( COUNT ( ?h ) AS ?v ) WHERE { resource:Q1300012 property:P1303 ?h . ?h rdf:type ontology:Q34379 } } . FILTER ( ?x > ?v ) }
toy piano
action greater
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
action count
action filter_type
action find
entity toy piano
relation instrument
type musical instrument
[{'concept': 'common name'}, 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ?y WHERE { { SELECT DISTINCT ?y ( COUNT ( ?w ) AS ?x ) WHERE { ?w property:instrument ?y . ?y rdf:type ontology:musical_instrument . ?w rdf:type ontology:common_name } GROUP BY ?y } . { SELECT DISTINCT ( COUNT ( ?h ) AS ?v ) WHERE { resource:toy_piano property:instrument ?h . ?h rdf:type ontology:musical_instrument } } . FILTER ( ?x > ?v ) }
[]
musical instrument common name
Q5994 Q81982 Q80284
SYSTEM
piano, harpsichord, viola
Q80284 Q46185 Q80019 Q2563510 Q5994 Q81982 Q206987 Q189737 Q8338 Q8371 Q8355 Q213461 Q3382191 Q213100 Q626035 Q742180 Q1444 Q220971 Q128309 Q726306 Q1343007 Q11404
(c(Q502895),P1303,c(Q34379))
action greater
action find_reverse_tuple_counts
relation P1303
type Q34379
type Q502895
action count
action filter_type
action find
entity Q1300012
relation P1303
type Q34379
The [ANSWERS] are played by greater number of people than toy piano
[{'concept': 'Q502895'}, 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ?y WHERE { { SELECT DISTINCT ?y ( COUNT ( ?w ) AS ?x ) WHERE { ?w property:P1303 ?y . ?y rdf:type ontology:Q34379 . ?w rdf:type ontology:Q502895 } GROUP BY ?y } . { SELECT DISTINCT ( COUNT ( ?h ) AS ?v ) WHERE { resource:Q1300012 property:P1303 ?h . ?h rdf:type ontology:Q34379 } } . FILTER ( ?x > ?v ) }
viola bass guitar double bass steel-string acoustic guitar piano harpsichord vibraphone timpani trumpet cello violin harmonium upright piano tabla glockenspiel viola d'amore organ marimba drum kit erhu electronic keyboard drum
The piano, harpsichord and viola are played by greater number of people than toy piano
piano harpsichord viola
action greater
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
action count
action filter_type
action find
entity toy piano
relation instrument
type musical instrument
[{'concept': 'common name'}, 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ?y WHERE { { SELECT DISTINCT ?y ( COUNT ( ?w ) AS ?x ) WHERE { ?w property:instrument ?y . ?y rdf:type ontology:musical_instrument . ?w rdf:type ontology:common_name } GROUP BY ?y } . { SELECT DISTINCT ( COUNT ( ?h ) AS ?v ) WHERE { resource:toy_piano property:instrument ?h . ?h rdf:type ontology:musical_instrument } } . FILTER ( ?x > ?v ) }
[]
Comparative Reasoning (All)
Comparative|More/Less|Single entity type|Incomplete
Q890073
P1303
Q34379 Q502895
USER
And also tell me about Body percussion?
(c(Q502895),P1303,c(Q34379))
action greater
action find_reverse_tuple_counts
relation P1303
type Q34379
type Q502895
action count
action filter_type
action find
entity Q890073
relation P1303
type Q34379
[{'concept': 'Q502895'}, 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ?q WHERE { { SELECT DISTINCT ?q ( COUNT ( ?i ) AS ?p ) WHERE { ?i property:P1303 ?q . ?i rdf:type ontology:Q502895 . ?q rdf:type ontology:Q34379 } GROUP BY ?q } . { SELECT DISTINCT ( COUNT ( ?e ) AS ?d ) WHERE { ?e rdf:type ontology:Q34379 . resource:Q890073 property:P1303 ?e } } . FILTER ( ?p > ?d ) }
Body percussion
action greater
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
action count
action filter_type
action find
entity Body percussion
relation instrument
type musical instrument
[{'concept': 'common name'}, 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ?q WHERE { { SELECT DISTINCT ?q ( COUNT ( ?i ) AS ?p ) WHERE { ?i property:instrument ?q . ?i rdf:type ontology:common_name . ?q rdf:type ontology:musical_instrument } GROUP BY ?q } . { SELECT DISTINCT ( COUNT ( ?e ) AS ?d ) WHERE { ?e rdf:type ontology:musical_instrument . resource:Body_percussion property:instrument ?e } } . FILTER ( ?p > ?d ) }
[]
musical instrument common name
Q5994 Q81982 Q862501
SYSTEM
piano, harpsichord, ondes Martenot
Q80284 Q46185 Q201129 Q424017 Q80019 Q2563510 Q5994 Q3574843 Q81982 Q182718 Q206987 Q189737 Q8338 Q8371 Q8355 Q213461 Q3382191 Q862501 Q213100 Q537750 Q626035 Q742180 Q1300012 Q1444 Q220971 Q128309 Q726306 Q483994 Q1343007 Q11404
(c(Q502895),P1303,c(Q34379))
action greater
action find_reverse_tuple_counts
relation P1303
type Q34379
type Q502895
action count
action filter_type
action find
entity Q890073
relation P1303
type Q34379
[ANSWERS]
[{'concept': 'Q502895'}, 'P1303', {'concept': 'Q34379'}]
SELECT DISTINCT ?q WHERE { { SELECT DISTINCT ?q ( COUNT ( ?i ) AS ?p ) WHERE { ?i property:P1303 ?q . ?i rdf:type ontology:Q502895 . ?q rdf:type ontology:Q34379 } GROUP BY ?q } . { SELECT DISTINCT ( COUNT ( ?e ) AS ?d ) WHERE { ?e rdf:type ontology:Q34379 . resource:Q890073 property:P1303 ?e } } . FILTER ( ?p > ?d ) }
viola bass guitar lyre acoustic bass guitar double bass steel-string acoustic guitar piano tonbak harpsichord Nyckelharpa vibraphone timpani trumpet cello violin harmonium upright piano ondes Martenot tabla Djembe glockenspiel viola d'amore toy piano organ marimba drum kit erhu Kazoo electronic keyboard drum
piano harpsichord ondes Martenot
action greater
action find_reverse_tuple_counts
relation instrument
type musical instrument
type common name
action count
action filter_type
action find
entity Body percussion
relation instrument
type musical instrument
[{'concept': 'common name'}, 'instrument', {'concept': 'musical instrument'}]
SELECT DISTINCT ?q WHERE { { SELECT DISTINCT ?q ( COUNT ( ?i ) AS ?p ) WHERE { ?i property:instrument ?q . ?i rdf:type ontology:common_name . ?q rdf:type ontology:musical_instrument } GROUP BY ?q } . { SELECT DISTINCT ( COUNT ( ?e ) AS ?d ) WHERE { ?e rdf:type ontology:musical_instrument . resource:Body_percussion property:instrument ?e } } . FILTER ( ?p > ?d ) }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q1934641 Q17151207
P19 P20
Q56061
USER
Which administrative territories were Shawky El Said born in or are the places of death of Miles Crowley ?
OR((Q17151207,P19,c(Q56061)), (Q1934641,P20,c(Q56061)))
action filter_type
action union
action find
entity Q17151207
relation P19
action find
entity Q1934641
relation P20
type Q56061
{'OR': [['Q17151207', 'P19', {'concept': 'Q56061'}], ['Q1934641', 'P20', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?l WHERE { { { resource:Q17151207 property:P19 ?l } UNION { resource:Q1934641 property:P20 ?l } } . ?l rdf:type ontology:Q56061 }
Miles Crowley Shawky El Said
action filter_type
action union
action find
entity Shawky El Said
relation place of birth
action find
entity Miles Crowley
relation place of death
type administrative territorial entity
{'OR': [['Shawky El Said', 'place of birth', {'concept': 'administrative territorial entity'}], ['Miles Crowley', 'place of death', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?l WHERE { { { resource:Shawky_El_Said property:place_of_birth ?l } UNION { resource:Miles_Crowley property:place_of_death ?l } } . ?l rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q135744 Q85
SYSTEM
Galveston, Cairo
Q135744 Q85
OR((Q17151207,P19,c(Q56061)), (Q1934641,P20,c(Q56061)))
action filter_type
action union
action find
entity Q17151207
relation P19
action find
entity Q1934641
relation P20
type Q56061
Shawky El Said were born in the [ANSWERS] or are the places of death of Miles Crowley
{'OR': [['Q17151207', 'P19', {'concept': 'Q56061'}], ['Q1934641', 'P20', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?l WHERE { { { resource:Q17151207 property:P19 ?l } UNION { resource:Q1934641 property:P20 ?l } } . ?l rdf:type ontology:Q56061 }
Galveston Cairo
Shawky El Said were born in the Galveston and Cairo or are the places of death of Miles Crowley
Galveston Cairo
action filter_type
action union
action find
entity Shawky El Said
relation place of birth
action find
entity Miles Crowley
relation place of death
type administrative territorial entity
{'OR': [['Shawky El Said', 'place of birth', {'concept': 'administrative territorial entity'}], ['Miles Crowley', 'place of death', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?l WHERE { { { resource:Shawky_El_Said property:place_of_birth ?l } UNION { resource:Miles_Crowley property:place_of_death ?l } } . ?l rdf:type ontology:administrative_territorial_entity }
[]
Clarification
Simple Question|Single Entity|Indirect
Q135744
P127
Q62447
USER
Which aerodrome is owned by that administrative territory ?
(c(Q62447),P127,Q135744)
action filter_type
action find_reverse
entity Q135744
relation P127
type Q62447
[{'concept': 'Q62447'}, 'P127', 'Q135744']
SELECT DISTINCT ?a WHERE { ?a property:P127 resource:Q135744 . ?a rdf:type ontology:Q62447 }
Galveston
action filter_type
action find_reverse
entity Galveston
relation owned by
type aerodrome
[{'concept': 'aerodrome'}, 'owned by', 'Galveston']
SELECT DISTINCT ?a WHERE { ?a property:owned_by resource:Galveston . ?a rdf:type ontology:aerodrome }
[]
aerodrome
Clarification for simple ques.
Q85
SYSTEM
Did you mean Cairo ?
Q135744 Q85
(c(Q62447),P127,Q135744) (c(Q62447),P127,Q85)
[ANSWER]
[{'concept': 'Q62447'}, 'P127', 'Q135744'] [{'concept': 'Q62447'}, 'P127', 'Q85']
SELECT DISTINCT ?a WHERE { ?a property:P127 resource:Q135744 . ?a rdf:type ontology:Q62447 }
Galveston Cairo
Did you mean Cairo ?
Cairo
[{'concept': 'aerodrome'}, 'owned by', 'Galveston'] [{'concept': 'aerodrome'}, 'owned by', 'Cairo']
SELECT DISTINCT ?a WHERE { ?a property:owned_by resource:Galveston . ?a rdf:type ontology:aerodrome }
[]
Simple Question (Coreferenced)
USER
No, I meant Galveston. Could you tell me the answer for that?
(c(Q62447),P127,Q135744)
Q135744
[{'concept': 'Q62447'}, 'P127', 'Q135744']
[{'concept': 'aerodrome'}, 'owned by', 'Galveston']
[]
Q6587665
SYSTEM
Scholes International Airport at Galveston
Q6587665
(c(Q62447),P127,Q135744)
action filter_type
action find_reverse
entity Q135744
relation P127
type Q62447
[ANSWER] is owned by that administrative territory
[{'concept': 'Q62447'}, 'P127', 'Q135744']
SELECT DISTINCT ?a WHERE { ?a property:P127 resource:Q135744 . ?a rdf:type ontology:Q62447 }
Scholes International Airport at Galveston
Scholes International Airport at Galveston is owned by that administrative territory
Scholes International Airport at Galveston
action filter_type
action find_reverse
entity Galveston
relation owned by
type aerodrome
[{'concept': 'aerodrome'}, 'owned by', 'Galveston']
SELECT DISTINCT ?a WHERE { ?a property:owned_by resource:Galveston . ?a rdf:type ontology:aerodrome }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q6587665
P931
Q56061
USER
Which city is served by that aerodrome ?
(Q6587665,P931,c(Q56061))
action filter_type
action find
entity Q6587665
relation P931
type Q56061
['Q6587665', 'P931', {'concept': 'Q56061'}]
SELECT DISTINCT ?p WHERE { resource:Q6587665 property:P931 ?p . ?p rdf:type ontology:Q56061 }
Scholes International Airport at Galveston
action filter_type
action find
entity Scholes International Airport at Galveston
relation place served by airport
type administrative territorial entity
['Scholes International Airport at Galveston', 'place served by airport', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?p WHERE { resource:Scholes_International_Airport_at_Galveston property:place_served_by_airport ?p . ?p rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q135744
SYSTEM
Galveston
Q135744
(Q6587665,P931,c(Q56061))
action filter_type
action find
entity Q6587665
relation P931
type Q56061
[ANSWER] is served by that aerodrome
['Q6587665', 'P931', {'concept': 'Q56061'}]
SELECT DISTINCT ?p WHERE { resource:Q6587665 property:P931 ?p . ?p rdf:type ontology:Q56061 }
Galveston
Galveston is served by that aerodrome
Galveston
action filter_type
action find
entity Scholes International Airport at Galveston
relation place served by airport
type administrative territorial entity
['Scholes International Airport at Galveston', 'place served by airport', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ?p WHERE { resource:Scholes_International_Airport_at_Galveston property:place_served_by_airport ?p . ?p rdf:type ontology:administrative_territorial_entity }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q3246678 Q85
P19 P190
Q515
USER
Which cities are twin towns of Cairo or are the places of birth of Goshi Okubo ?
OR((Q85,P190,c(Q515)), (Q3246678,P19,c(Q515)))
action filter_type
action union
action find
entity Q85
relation P190
action find
entity Q3246678
relation P19
type Q515
{'OR': [['Q85', 'P190', {'concept': 'Q515'}], ['Q3246678', 'P19', {'concept': 'Q515'}]]}
SELECT DISTINCT ?l WHERE { { { resource:Q85 property:P190 ?l } UNION { resource:Q3246678 property:P19 ?l } } . ?l rdf:type ontology:Q515 }
Goshi Okubo Cairo
action filter_type
action union
action find
entity Cairo
relation sister city
action find
entity Goshi Okubo
relation place of birth
type city
{'OR': [['Cairo', 'sister city', {'concept': 'city'}], ['Goshi Okubo', 'place of birth', {'concept': 'city'}]]}
SELECT DISTINCT ?l WHERE { { { resource:Cairo property:sister_city ?l } UNION { resource:Goshi_Okubo property:place_of_birth ?l } } . ?l rdf:type ontology:city }
[]
city
Q8684 Q518203 Q1794 Q1486 Q7473516 Q11194
SYSTEM
Seoul, Iwanuma, Frankfurt, Buenos Aires, Tokyo, Sarajevo
Q8684 Q518203 Q1794 Q1486 Q7473516 Q11194
OR((Q85,P190,c(Q515)), (Q3246678,P19,c(Q515)))
action filter_type
action union
action find
entity Q85
relation P190
action find
entity Q3246678
relation P19
type Q515
[ANSWERS] are twin towns of Cairo or are the places of birth of Goshi Okubo
{'OR': [['Q85', 'P190', {'concept': 'Q515'}], ['Q3246678', 'P19', {'concept': 'Q515'}]]}
SELECT DISTINCT ?l WHERE { { { resource:Q85 property:P190 ?l } UNION { resource:Q3246678 property:P19 ?l } } . ?l rdf:type ontology:Q515 }
Seoul Iwanuma Frankfurt Buenos Aires Tokyo Sarajevo
Seoul, Iwanuma, Frankfurt, Buenos Aires, Tokyo and Sarajevo are twin towns of Cairo or are the places of birth of Goshi Okubo
Seoul Iwanuma Frankfurt Buenos Aires Tokyo Sarajevo
action filter_type
action union
action find
entity Cairo
relation sister city
action find
entity Goshi Okubo
relation place of birth
type city
{'OR': [['Cairo', 'sister city', {'concept': 'city'}], ['Goshi Okubo', 'place of birth', {'concept': 'city'}]]}
SELECT DISTINCT ?l WHERE { { { resource:Cairo property:sister_city ?l } UNION { resource:Goshi_Okubo property:place_of_birth ?l } } . ?l rdf:type ontology:city }
[]
Quantitative Reasoning (All)
Quantitative|Atleast/ Atmost/ Approx. the same/Equal|Single entity type
P190
Q515 Q1048835
USER
Which political territories are sister town of exactly 3 cities ?
(c(Q1048835),P190,c(Q515))
action equal
action find_tuple_counts
relation P190
type Q1048835
type Q515
value 3
[{'concept': 'Q1048835'}, 'P190', {'concept': 'Q515'}]
SELECT DISTINCT ?x WHERE { { SELECT DISTINCT ?x ( COUNT ( ?l ) AS ?r ) WHERE { ?x rdf:type ontology:Q1048835 . ?l rdf:type ontology:Q515 . ?x property:P190 ?l } GROUP BY ?x } . FILTER ( ?r = 3 ) }
action equal
action find_tuple_counts
relation sister city
type political territorial entity
type city
value 3
[{'concept': 'political territorial entity'}, 'sister city', {'concept': 'city'}]
SELECT DISTINCT ?x WHERE { { SELECT DISTINCT ?x ( COUNT ( ?l ) AS ?r ) WHERE { ?x rdf:type ontology:political_territorial_entity . ?l rdf:type ontology:city . ?x property:sister_city ?l } GROUP BY ?x } . FILTER ( ?r = 3 ) }
[]
city political territorial entity
Q30002 Q436491
SYSTEM
Chengdu, Altea
Q30002 Q436491
(c(Q1048835),P190,c(Q515))
action equal
action find_tuple_counts
relation P190
type Q1048835
type Q515
value 3
[ANSWERS] are sister town of exactly 3 cities
[{'concept': 'Q1048835'}, 'P190', {'concept': 'Q515'}]
SELECT DISTINCT ?x WHERE { { SELECT DISTINCT ?x ( COUNT ( ?l ) AS ?r ) WHERE { ?x rdf:type ontology:Q1048835 . ?l rdf:type ontology:Q515 . ?x property:P190 ?l } GROUP BY ?x } . FILTER ( ?r = 3 ) }
Chengdu Altea
Chengdu and Altea are sister town of exactly 3 cities
Chengdu Altea
action equal
action find_tuple_counts
relation sister city
type political territorial entity
type city
value 3
[{'concept': 'political territorial entity'}, 'sister city', {'concept': 'city'}]
SELECT DISTINCT ?x WHERE { { SELECT DISTINCT ?x ( COUNT ( ?l ) AS ?r ) WHERE { ?x rdf:type ontology:political_territorial_entity . ?l rdf:type ontology:city . ?x property:sister_city ?l } GROUP BY ?x } . FILTER ( ?r = 3 ) }
[]