Simple Question (Direct)
Simple Question
Q3181200
P641
Q349
USER
What did John Carlsen participate in ?
(Q3181200,P641,c(Q349))
action filter_type
action find
entity Q3181200
relation P641
type Q349
['Q3181200', 'P641', {'concept': 'Q349'}]
SELECT DISTINCT ?j WHERE { resource:Q3181200 property:P641 ?j . ?j rdf:type ontology:Q349 }
John Carlsen
action filter_type
action find
entity John Carlsen
relation sport
type sport
['John Carlsen', 'sport', {'concept': 'sport'}]
SELECT DISTINCT ?j WHERE { resource:John_Carlsen property:sport ?j . ?j rdf:type ontology:sport }
[]
sport
Q2215841
SYSTEM
cycle sport
Q2215841
(Q3181200,P641,c(Q349))
action filter_type
action find
entity Q3181200
relation P641
type Q349
[ANSWER]
['Q3181200', 'P641', {'concept': 'Q349'}]
SELECT DISTINCT ?j WHERE { resource:Q3181200 property:P641 ?j . ?j rdf:type ontology:Q349 }
cycle sport
cycle sport
action filter_type
action find
entity John Carlsen
relation sport
type sport
['John Carlsen', 'sport', {'concept': 'sport'}]
SELECT DISTINCT ?j WHERE { resource:John_Carlsen property:sport ?j . ?j rdf:type ontology:sport }
[]
Logical Reasoning (All)
Logical|Union|Multiple_Relation
Q1647730 Q3181200
P47 P27
Q1048835
USER
Which political territories do John Carlsen belong to or share the border with Almáchar ?
OR((Q3181200,P27,c(Q1048835)), (Q1647730,P47,c(Q1048835)))
action filter_type
action union
action find
entity Q3181200
relation P27
action find
entity Q1647730
relation P47
type Q1048835
{'OR': [['Q3181200', 'P27', {'concept': 'Q1048835'}], ['Q1647730', 'P47', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?w WHERE { { { resource:Q3181200 property:P27 ?w } UNION { resource:Q1647730 property:P47 ?w } } . ?w rdf:type ontology:Q1048835 }
Almáchar John Carlsen
action filter_type
action union
action find
entity John Carlsen
relation country of citizenship
action find
entity Almáchar
relation shares border with
type political territorial entity
{'OR': [['John Carlsen', 'country of citizenship', {'concept': 'political territorial entity'}], ['Almáchar', 'shares border with', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?w WHERE { { { resource:John_Carlsen property:country_of_citizenship ?w } UNION { resource:Almáchar property:shares_border_with ?w } } . ?w rdf:type ontology:political_territorial_entity }
[]
political territorial entity
Q1630208 Q385419 Q970721 Q13152 Q1630306 Q35 Q492741 Q1630462 Q1630429
SYSTEM
El Borge, Cútar, Benamargosa, Moclinejo, Riogordo, Denmark, Vélez-Málaga, Macharaviaya, Iznate
Q1630208 Q385419 Q970721 Q13152 Q1630306 Q35 Q492741 Q1630462 Q1630429
OR((Q3181200,P27,c(Q1048835)), (Q1647730,P47,c(Q1048835)))
action filter_type
action union
action find
entity Q3181200
relation P27
action find
entity Q1647730
relation P47
type Q1048835
[ANSWERS]
{'OR': [['Q3181200', 'P27', {'concept': 'Q1048835'}], ['Q1647730', 'P47', {'concept': 'Q1048835'}]]}
SELECT DISTINCT ?w WHERE { { { resource:Q3181200 property:P27 ?w } UNION { resource:Q1647730 property:P47 ?w } } . ?w rdf:type ontology:Q1048835 }
El Borge Cútar Benamargosa Moclinejo Riogordo Denmark Vélez-Málaga Macharaviaya Iznate
El Borge Cútar Benamargosa Moclinejo Riogordo Denmark Vélez-Málaga Macharaviaya Iznate
action filter_type
action union
action find
entity John Carlsen
relation country of citizenship
action find
entity Almáchar
relation shares border with
type political territorial entity
{'OR': [['John Carlsen', 'country of citizenship', {'concept': 'political territorial entity'}], ['Almáchar', 'shares border with', {'concept': 'political territorial entity'}]]}
SELECT DISTINCT ?w WHERE { { { resource:John_Carlsen property:country_of_citizenship ?w } UNION { resource:Almáchar property:shares_border_with ?w } } . ?w rdf:type ontology:political_territorial_entity }
[]
Quantitative Reasoning (All)
Quantitative|Atleast/ Atmost/ Approx. the same/Equal|Mult. entity type
P530
Q1048835 Q15617994 Q1048835
USER
Which political territories have diplomatic associations with exactly 117 political territories and administrative territories ?
(c(Q1048835),P530,c(Q1048835)|c(Q15617994))
action equal
action union
action find_tuple_counts
relation P530
type Q1048835
type Q1048835
action find_tuple_counts
relation P530
type Q1048835
type Q15617994
value 117
[{'concept': 'Q1048835'}, 'P530', [{'concept': 'Q1048835'}, {'concept': 'Q15617994'}]]
SELECT DISTINCT ?r WHERE { FILTER ( ?z = 117 ) . { SELECT DISTINCT ( COUNT ( ?t ) AS ?z ) ?r WHERE { { ?r property:P530 ?t . ?r rdf:type ontology:Q1048835 . ?t rdf:type ontology:Q1048835 } UNION { ?t rdf:type ontology:Q15617994 . ?r rdf:type ontology:Q1048835 . ?r property:P530 ?t } } GROUP BY ?r } }
action equal
action union
action find_tuple_counts
relation diplomatic relation
type political territorial entity
type political territorial entity
action find_tuple_counts
relation diplomatic relation
type political territorial entity
type designation for an administrative territorial entity
value 117
[{'concept': 'political territorial entity'}, 'diplomatic relation', [{'concept': 'political territorial entity'}, {'concept': 'designation for an administrative territorial entity'}]]
SELECT DISTINCT ?r WHERE { FILTER ( ?z = 117 ) . { SELECT DISTINCT ( COUNT ( ?t ) AS ?z ) ?r WHERE { { ?r property:diplomatic_relation ?t . ?r rdf:type ontology:political_territorial_entity . ?t rdf:type ontology:political_territorial_entity } UNION { ?t rdf:type ontology:designation_for_an_administrative_territorial_entity . ?r rdf:type ontology:political_territorial_entity . ?r property:diplomatic_relation ?t } } GROUP BY ?r } }
[]
political territorial entity designation for an administrative territorial entity political territorial entity
Q408
SYSTEM
Australia
Q408
(c(Q1048835),P530,c(Q1048835)|c(Q15617994))
action equal
action union
action find_tuple_counts
relation P530
type Q1048835
type Q1048835
action find_tuple_counts
relation P530
type Q1048835
type Q15617994
value 117
[ANSWER]
[{'concept': 'Q1048835'}, 'P530', [{'concept': 'Q1048835'}, {'concept': 'Q15617994'}]]
SELECT DISTINCT ?r WHERE { FILTER ( ?z = 117 ) . { SELECT DISTINCT ( COUNT ( ?t ) AS ?z ) ?r WHERE { { ?r property:P530 ?t . ?r rdf:type ontology:Q1048835 . ?t rdf:type ontology:Q1048835 } UNION { ?t rdf:type ontology:Q15617994 . ?r rdf:type ontology:Q1048835 . ?r property:P530 ?t } } GROUP BY ?r } }
Australia
Australia
action equal
action union
action find_tuple_counts
relation diplomatic relation
type political territorial entity
type political territorial entity
action find_tuple_counts
relation diplomatic relation
type political territorial entity
type designation for an administrative territorial entity
value 117
[{'concept': 'political territorial entity'}, 'diplomatic relation', [{'concept': 'political territorial entity'}, {'concept': 'designation for an administrative territorial entity'}]]
SELECT DISTINCT ?r WHERE { FILTER ( ?z = 117 ) . { SELECT DISTINCT ( COUNT ( ?t ) AS ?z ) ?r WHERE { { ?r property:diplomatic_relation ?t . ?r rdf:type ontology:political_territorial_entity . ?t rdf:type ontology:political_territorial_entity } UNION { ?t rdf:type ontology:designation_for_an_administrative_territorial_entity . ?r rdf:type ontology:political_territorial_entity . ?r property:diplomatic_relation ?t } } GROUP BY ?r } }
[]
Verification (Boolean) (All)
Verification|2 entities, one direct and one indirect, subject is indirect
Q408 Q269372
P6
Q502895
USER
Is that political territory the head of goverment of Bob Hawke ?
(Q408,P6,Q269372)
action is_in
entity Q269372
action find
entity Q408
relation P6
['Q408', 'P6', 'Q269372']
ASK WHERE { resource:Q408 property:P6 resource:Q269372 }
Australia Bob Hawke
action is_in
entity Bob Hawke
action find
entity Australia
relation head of government
['Australia', 'head of government', 'Bob Hawke']
ASK WHERE { resource:Australia property:head_of_government resource:Bob_Hawke }
[]
common name
SYSTEM
YES
(Q408,P6,Q269372)
action is_in
entity Q269372
action find
entity Q408
relation P6
[ANSWER]
['Q408', 'P6', 'Q269372']
ASK WHERE { resource:Q408 property:P6 resource:Q269372 }
Yes
action is_in
entity Bob Hawke
action find
entity Australia
relation head of government
['Australia', 'head of government', 'Bob Hawke']
ASK WHERE { resource:Australia property:head_of_government resource:Bob_Hawke }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P641
Q349 Q13406554 Q12973014
USER
Which sports were max number of sport competitions or sports teams a part of ?
(c(Q13406554)|c(Q12973014),P641,c(Q349))
action argmax
action union
action find_reverse_tuple_counts
relation P641
type Q349
type Q13406554
action find_reverse_tuple_counts
relation P641
type Q349
type Q12973014
[[{'concept': 'Q13406554'}, {'concept': 'Q12973014'}], 'P641', {'concept': 'Q349'}]
SELECT DISTINCT ?e WHERE { { SELECT DISTINCT ( MAX ( ?t ) AS ?u ) { SELECT DISTINCT ( COUNT ( ?w ) AS ?t ) ?f WHERE { VALUES ( ?j ) { ( ontology:Q13406554 ) ( ontology:Q12973014 ) } . ?w rdf:type ?j } GROUP BY ?f } } . { SELECT DISTINCT ( COUNT ( ?l ) AS ?p ) ?e WHERE { { ?l property:P641 ?e . ?e rdf:type ontology:Q349 . ?l rdf:type ontology:Q13406554 } UNION { ?l property:P641 ?e . ?e rdf:type ontology:Q349 . ?l rdf:type ontology:Q12973014 } } GROUP BY ?e } . FILTER ( ?p = ?u ) }
action argmax
action union
action find_reverse_tuple_counts
relation sport
type sport
type sport competition
action find_reverse_tuple_counts
relation sport
type sport
type sports team
[[{'concept': 'sport competition'}, {'concept': 'sports team'}], 'sport', {'concept': 'sport'}]
SELECT DISTINCT ?e WHERE { { SELECT DISTINCT ( MAX ( ?t ) AS ?u ) { SELECT DISTINCT ( COUNT ( ?w ) AS ?t ) ?f WHERE { VALUES ( ?j ) { ( ontology:sport_competition ) ( ontology:sports_team ) } . ?w rdf:type ?j } GROUP BY ?f } } . { SELECT DISTINCT ( COUNT ( ?l ) AS ?p ) ?e WHERE { { ?l property:sport ?e . ?e rdf:type ontology:sport . ?l rdf:type ontology:sport_competition } UNION { ?l property:sport ?e . ?e rdf:type ontology:sport . ?l rdf:type ontology:sports_team } } GROUP BY ?e } . FILTER ( ?p = ?u ) }
[]
sport sport competition sports team
Q2736
SYSTEM
association football
Q2736
(c(Q13406554)|c(Q12973014),P641,c(Q349))
action argmax
action union
action find_reverse_tuple_counts
relation P641
type Q349
type Q13406554
action find_reverse_tuple_counts
relation P641
type Q349
type Q12973014
[ANSWER]
[[{'concept': 'Q13406554'}, {'concept': 'Q12973014'}], 'P641', {'concept': 'Q349'}]
SELECT DISTINCT ?e WHERE { { SELECT DISTINCT ( MAX ( ?t ) AS ?u ) { SELECT DISTINCT ( COUNT ( ?w ) AS ?t ) ?f WHERE { VALUES ( ?j ) { ( ontology:Q13406554 ) ( ontology:Q12973014 ) } . ?w rdf:type ?j } GROUP BY ?f } } . { SELECT DISTINCT ( COUNT ( ?l ) AS ?p ) ?e WHERE { { ?l property:P641 ?e . ?e rdf:type ontology:Q349 . ?l rdf:type ontology:Q13406554 } UNION { ?l property:P641 ?e . ?e rdf:type ontology:Q349 . ?l rdf:type ontology:Q12973014 } } GROUP BY ?e } . FILTER ( ?p = ?u ) }
association football
association football
action argmax
action union
action find_reverse_tuple_counts
relation sport
type sport
type sport competition
action find_reverse_tuple_counts
relation sport
type sport
type sports team
[[{'concept': 'sport competition'}, {'concept': 'sports team'}], 'sport', {'concept': 'sport'}]
SELECT DISTINCT ?e WHERE { { SELECT DISTINCT ( MAX ( ?t ) AS ?u ) { SELECT DISTINCT ( COUNT ( ?w ) AS ?t ) ?f WHERE { VALUES ( ?j ) { ( ontology:sport_competition ) ( ontology:sports_team ) } . ?w rdf:type ?j } GROUP BY ?f } } . { SELECT DISTINCT ( COUNT ( ?l ) AS ?p ) ?e WHERE { { ?l property:sport ?e . ?e rdf:type ontology:sport . ?l rdf:type ontology:sport_competition } UNION { ?l property:sport ?e . ?e rdf:type ontology:sport . ?l rdf:type ontology:sports_team } } GROUP BY ?e } . FILTER ( ?p = ?u ) }
[]