Simple Question (Direct)
Simple Question
Q676095
P734
Q82799
USER
Who is associated with Stevan Stojanović ?
(Q676095,P734,c(Q82799))
action filter_type
action find
entity Q676095
relation P734
type Q82799
['Q676095', 'P734', {'concept': 'Q82799'}]
SELECT DISTINCT ?o WHERE { ?o rdf:type ontology:Q82799 . resource:Q676095 property:P734 ?o }
Stevan Stojanović
action filter_type
action find
entity Stevan Stojanović
relation family name
type name
['Stevan Stojanović', 'family name', {'concept': 'name'}]
SELECT DISTINCT ?o WHERE { ?o rdf:type ontology:name . resource:Stevan_Stojanović property:family_name ?o }
[]
name
Q21475376
SYSTEM
Stojanović
Q21475376
(Q676095,P734,c(Q82799))
action filter_type
action find
entity Q676095
relation P734
type Q82799
[ANSWER] is associated with Stevan [ANSWER]
['Q676095', 'P734', {'concept': 'Q82799'}]
SELECT DISTINCT ?o WHERE { ?o rdf:type ontology:Q82799 . resource:Q676095 property:P734 ?o }
Stojanović
Stojanović is associated with Stevan Stojanović
Stojanović
action filter_type
action find
entity Stevan Stojanović
relation family name
type name
['Stevan Stojanović', 'family name', {'concept': 'name'}]
SELECT DISTINCT ?o WHERE { ?o rdf:type ontology:name . resource:Stevan_Stojanović property:family_name ?o }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count|Single entity type
Q676095
P19
Q56061
USER
How many administrative territories were Stevan Stojanović born in ?
(Q676095,P19,c(Q56061))
action count
action filter_type
action find
entity Q676095
relation P19
type Q56061
['Q676095', 'P19', {'concept': 'Q56061'}]
SELECT DISTINCT ( COUNT ( ?p ) AS ?t ) WHERE { resource:Q676095 property:P19 ?p . ?p rdf:type ontology:Q56061 }
Stevan Stojanović
action count
action filter_type
action find
entity Stevan Stojanović
relation place of birth
type administrative territorial entity
['Stevan Stojanović', 'place of birth', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ( COUNT ( ?p ) AS ?t ) WHERE { resource:Stevan_Stojanović property:place_of_birth ?p . ?p rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
SYSTEM
1
Q178168
(Q676095,P19,c(Q56061))
action count
action filter_type
action find
entity Q676095
relation P19
type Q56061
[ANSWER]
['Q676095', 'P19', {'concept': 'Q56061'}]
SELECT DISTINCT ( COUNT ( ?p ) AS ?t ) WHERE { resource:Q676095 property:P19 ?p . ?p rdf:type ontology:Q56061 }
Mitrovica
1
action count
action filter_type
action find
entity Stevan Stojanović
relation place of birth
type administrative territorial entity
['Stevan Stojanović', 'place of birth', {'concept': 'administrative territorial entity'}]
SELECT DISTINCT ( COUNT ( ?p ) AS ?t ) WHERE { resource:Stevan_Stojanović property:place_of_birth ?p . ?p rdf:type ontology:administrative_territorial_entity }
[]
Simple Question (Coreferenced)
Simple Question|Single Entity|Indirect
Q676095
P19
Q56061
USER
Which administrative territory is the birthplace of that person ?
action filter_type
action find
entity Q676095
relation P19
type Q56061
SELECT DISTINCT ?n WHERE { resource:Q676095 property:P19 ?n . ?n rdf:type ontology:Q56061 }
Stevan Stojanović
action filter_type
action find
entity Stevan Stojanović
relation place of birth
type administrative territorial entity
SELECT DISTINCT ?n WHERE { resource:Stevan_Stojanović property:place_of_birth ?n . ?n rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q178168
SYSTEM
Mitrovica
Q178168
action filter_type
action find
entity Q676095
relation P19
type Q56061
[ANSWER] is the birthplace of that person
SELECT DISTINCT ?n WHERE { resource:Q676095 property:P19 ?n . ?n rdf:type ontology:Q56061 }
Mitrovica
Mitrovica is the birthplace of that person
Mitrovica
action filter_type
action find
entity Stevan Stojanović
relation place of birth
type administrative territorial entity
SELECT DISTINCT ?n WHERE { resource:Stevan_Stojanović property:place_of_birth ?n . ?n rdf:type ontology:administrative_territorial_entity }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation|Incomplete
Q15720248 Q676095
P19
Q56061
USER
Or Christophor Vermishev?
OR((Q676095,P19,c(Q56061)), (Q15720248,P19,c(Q56061)))
action filter_type
action union
action find
entity Q676095
relation P19
action find
entity Q15720248
relation P19
type Q56061
{'OR': [['Q676095', 'P19', {'concept': 'Q56061'}], ['Q15720248', 'P19', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?r WHERE { { { resource:Q676095 property:P19 ?r } UNION { resource:Q15720248 property:P19 ?r } } . ?r rdf:type ontology:Q56061 }
Christophor Vermishev Stevan Stojanović
action filter_type
action union
action find
entity Stevan Stojanović
relation place of birth
action find
entity Christophor Vermishev
relation place of birth
type administrative territorial entity
{'OR': [['Stevan Stojanović', 'place of birth', {'concept': 'administrative territorial entity'}], ['Christophor Vermishev', 'place of birth', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?r WHERE { { { resource:Stevan_Stojanović property:place_of_birth ?r } UNION { resource:Christophor_Vermishev property:place_of_birth ?r } } . ?r rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q178168 Q9248
SYSTEM
Mitrovica, Baku
Q178168 Q9248
OR((Q676095,P19,c(Q56061)), (Q15720248,P19,c(Q56061)))
action filter_type
action union
action find
entity Q676095
relation P19
action find
entity Q15720248
relation P19
type Q56061
[ANSWERS]
{'OR': [['Q676095', 'P19', {'concept': 'Q56061'}], ['Q15720248', 'P19', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?r WHERE { { { resource:Q676095 property:P19 ?r } UNION { resource:Q15720248 property:P19 ?r } } . ?r rdf:type ontology:Q56061 }
Mitrovica Baku
Mitrovica Baku
action filter_type
action union
action find
entity Stevan Stojanović
relation place of birth
action find
entity Christophor Vermishev
relation place of birth
type administrative territorial entity
{'OR': [['Stevan Stojanović', 'place of birth', {'concept': 'administrative territorial entity'}], ['Christophor Vermishev', 'place of birth', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?r WHERE { { { resource:Stevan_Stojanović property:place_of_birth ?r } UNION { resource:Christophor_Vermishev property:place_of_birth ?r } } . ?r rdf:type ontology:administrative_territorial_entity }
[]
Quantitative Reasoning (Count) (All)
Quantitative|Count|Logical operators
Q9248
P190
Q56061 Q13220204
USER
How many administrative territories and administrative country subdivisions are a sister city of Baku ?
(c(Q56061),P190,Q9248) (c(Q13220204),P190,Q9248)
action count
action union
action filter_type
action find_reverse
entity Q9248
relation P190
type Q56061
action filter_type
action find_reverse
entity Q9248
relation P190
type Q13220204
[{'concept': 'Q56061'}, 'P190', 'Q9248'] [{'concept': 'Q13220204'}, 'P190', 'Q9248']
SELECT DISTINCT ( COUNT ( ?s ) AS ?j ) WHERE { VALUES ( ?z ) { ( ontology:Q13220204 ) ( ontology:Q56061 ) } . ?s rdf:type ?z }
Baku
action count
action union
action filter_type
action find_reverse
entity Baku
relation sister city
type administrative territorial entity
action filter_type
action find_reverse
entity Baku
relation sister city
type second-level administrative country subdivision
[{'concept': 'administrative territorial entity'}, 'sister city', 'Baku'] [{'concept': 'second-level administrative country subdivision'}, 'sister city', 'Baku']
SELECT DISTINCT ( COUNT ( ?s ) AS ?j ) WHERE { VALUES ( ?z ) { ( ontology:second-level_administrative_country_subdivision ) ( ontology:administrative_territorial_entity ) } . ?s rdf:type ?z }
[]
administrative territorial entity second-level administrative country subdivision
SYSTEM
15 administrative territories and 1 administrative country subdivisions
Q80053 Q48195 Q641 Q21194 Q3718 Q25416 Q8678 Q104560 Q16555 Q2634 Q81398 Q84 Q3805 Q994719 Q406 Q1479
(c(Q56061),P190,Q9248) (c(Q13220204),P190,Q9248)
action count
action union
action filter_type
action find_reverse
entity Q9248
relation P190
type Q56061
action filter_type
action find_reverse
entity Q9248
relation P190
type Q13220204
[ANSWER]
[{'concept': 'Q56061'}, 'P190', 'Q9248'] [{'concept': 'Q13220204'}, 'P190', 'Q9248']
SELECT DISTINCT ( COUNT ( ?s ) AS ?j ) WHERE { VALUES ( ?z ) { ( ontology:Q13220204 ) ( ontology:Q56061 ) } . ?s rdf:type ?z }
Tabriz Basra Venice Vũng Tàu Dakar Stavanger Rio de Janeiro Balakovo Houston Naples Acapulco London Amman Christiansted Istanbul Bordeaux
15 administrative territories and 1 administrative country subdivisions
action count
action union
action filter_type
action find_reverse
entity Baku
relation sister city
type administrative territorial entity
action filter_type
action find_reverse
entity Baku
relation sister city
type second-level administrative country subdivision
[{'concept': 'administrative territorial entity'}, 'sister city', 'Baku'] [{'concept': 'second-level administrative country subdivision'}, 'sister city', 'Baku']
SELECT DISTINCT ( COUNT ( ?s ) AS ?j ) WHERE { VALUES ( ?z ) { ( ontology:second-level_administrative_country_subdivision ) ( ontology:administrative_territorial_entity ) } . ?s rdf:type ?z }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q69222 Q178168
P190
Q515
USER
Which cities are the sister cities of Mitrovica or Aarwangen ?
OR((Q178168,P190,c(Q515)), (Q69222,P190,c(Q515)))
action filter_type
action union
action find
entity Q178168
relation P190
action find
entity Q69222
relation P190
type Q515
{'OR': [['Q178168', 'P190', {'concept': 'Q515'}], ['Q69222', 'P190', {'concept': 'Q515'}]]}
SELECT DISTINCT ?l WHERE { { ?a property:P190 ?l . VALUES ( ?a ) { ( resource:Q178168 ) ( resource:Q69222 ) } } . ?l rdf:type ontology:Q515 }
Aarwangen Mitrovica
action filter_type
action union
action find
entity Mitrovica
relation sister city
action find
entity Aarwangen
relation sister city
type city
{'OR': [['Mitrovica', 'sister city', {'concept': 'city'}], ['Aarwangen', 'sister city', {'concept': 'city'}]]}
SELECT DISTINCT ?l WHERE { { ?a property:sister_city ?l . VALUES ( ?a ) { ( resource:Mitrovica ) ( resource:Aarwangen ) } } . ?l rdf:type ontology:city }
[]
city
Q1008983 Q19689 Q15379
SYSTEM
Vodňany, Tirana, Kendari
Q1008983 Q19689 Q15379
OR((Q178168,P190,c(Q515)), (Q69222,P190,c(Q515)))
action filter_type
action union
action find
entity Q178168
relation P190
action find
entity Q69222
relation P190
type Q515
[ANSWERS] are the sister cities of Mitrovica or Aarwangen
{'OR': [['Q178168', 'P190', {'concept': 'Q515'}], ['Q69222', 'P190', {'concept': 'Q515'}]]}
SELECT DISTINCT ?l WHERE { { ?a property:P190 ?l . VALUES ( ?a ) { ( resource:Q178168 ) ( resource:Q69222 ) } } . ?l rdf:type ontology:Q515 }
Vodňany Tirana Kendari
Vodňany, Tirana and Kendari are the sister cities of Mitrovica or Aarwangen
Vodňany Tirana Kendari
action filter_type
action union
action find
entity Mitrovica
relation sister city
action find
entity Aarwangen
relation sister city
type city
{'OR': [['Mitrovica', 'sister city', {'concept': 'city'}], ['Aarwangen', 'sister city', {'concept': 'city'}]]}
SELECT DISTINCT ?l WHERE { { ?a property:sister_city ?l . VALUES ( ?a ) { ( resource:Mitrovica ) ( resource:Aarwangen ) } } . ?l rdf:type ontology:city }
[]
Quantitative Reasoning (All)
Quantitative|Min/Max|Mult. entity type
P190
Q515 Q1048835 Q15617994
USER
Which cities are partner towns of max number of political territories or administrative territories ?
(c(Q1048835)|c(Q15617994),P190,c(Q515))
action argmax
action union
action find_reverse_tuple_counts
relation P190
type Q515
type Q1048835
action find_reverse_tuple_counts
relation P190
type Q515
type Q15617994
[[{'concept': 'Q1048835'}, {'concept': 'Q15617994'}], 'P190', {'concept': 'Q515'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ?v ( COUNT ( ?o ) AS ?s ) WHERE { { ?o property:P190 ?v . ?v rdf:type ontology:Q515 . ?o rdf:type ontology:Q1048835 } UNION { ?o property:P190 ?v . ?v rdf:type ontology:Q515 . ?o rdf:type ontology:Q15617994 } } GROUP BY ?v } . FILTER ( ?s = ?k ) . { SELECT DISTINCT ( MAX ( ?z ) AS ?k ) { SELECT DISTINCT ?y ( COUNT ( ?l ) AS ?z ) WHERE { ?l rdf:type ?e . VALUES ( ?e ) { ( ontology:Q1048835 ) ( ontology:Q15617994 ) } } GROUP BY ?y } } }
action argmax
action union
action find_reverse_tuple_counts
relation sister city
type city
type political territorial entity
action find_reverse_tuple_counts
relation sister city
type city
type designation for an administrative territorial entity
[[{'concept': 'political territorial entity'}, {'concept': 'designation for an administrative territorial entity'}], 'sister city', {'concept': 'city'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ?v ( COUNT ( ?o ) AS ?s ) WHERE { { ?o property:sister_city ?v . ?v rdf:type ontology:city . ?o rdf:type ontology:political_territorial_entity } UNION { ?o property:sister_city ?v . ?v rdf:type ontology:city . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity } } GROUP BY ?v } . FILTER ( ?s = ?k ) . { SELECT DISTINCT ( MAX ( ?z ) AS ?k ) { SELECT DISTINCT ?y ( COUNT ( ?l ) AS ?z ) WHERE { ?l rdf:type ?e . VALUES ( ?e ) { ( ontology:political_territorial_entity ) ( ontology:designation_for_an_administrative_territorial_entity ) } } GROUP BY ?y } } }
[]
city political territorial entity designation for an administrative territorial entity
Q52607 Q1486
SYSTEM
Mar del Plata, Buenos Aires
Q52607 Q1486
(c(Q1048835)|c(Q15617994),P190,c(Q515))
action argmax
action union
action find_reverse_tuple_counts
relation P190
type Q515
type Q1048835
action find_reverse_tuple_counts
relation P190
type Q515
type Q15617994
[ANSWERS] are partner towns of max number of political territories or administrative territories
[[{'concept': 'Q1048835'}, {'concept': 'Q15617994'}], 'P190', {'concept': 'Q515'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ?v ( COUNT ( ?o ) AS ?s ) WHERE { { ?o property:P190 ?v . ?v rdf:type ontology:Q515 . ?o rdf:type ontology:Q1048835 } UNION { ?o property:P190 ?v . ?v rdf:type ontology:Q515 . ?o rdf:type ontology:Q15617994 } } GROUP BY ?v } . FILTER ( ?s = ?k ) . { SELECT DISTINCT ( MAX ( ?z ) AS ?k ) { SELECT DISTINCT ?y ( COUNT ( ?l ) AS ?z ) WHERE { ?l rdf:type ?e . VALUES ( ?e ) { ( ontology:Q1048835 ) ( ontology:Q15617994 ) } } GROUP BY ?y } } }
Mar del Plata Buenos Aires
Mar del Plata and Buenos Aires are partner towns of max number of political territories or administrative territories
Mar del Plata Buenos Aires
action argmax
action union
action find_reverse_tuple_counts
relation sister city
type city
type political territorial entity
action find_reverse_tuple_counts
relation sister city
type city
type designation for an administrative territorial entity
[[{'concept': 'political territorial entity'}, {'concept': 'designation for an administrative territorial entity'}], 'sister city', {'concept': 'city'}]
SELECT DISTINCT ?v WHERE { { SELECT DISTINCT ?v ( COUNT ( ?o ) AS ?s ) WHERE { { ?o property:sister_city ?v . ?v rdf:type ontology:city . ?o rdf:type ontology:political_territorial_entity } UNION { ?o property:sister_city ?v . ?v rdf:type ontology:city . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity } } GROUP BY ?v } . FILTER ( ?s = ?k ) . { SELECT DISTINCT ( MAX ( ?z ) AS ?k ) { SELECT DISTINCT ?y ( COUNT ( ?l ) AS ?z ) WHERE { ?l rdf:type ?e . VALUES ( ?e ) { ( ontology:political_territorial_entity ) ( ontology:designation_for_an_administrative_territorial_entity ) } } GROUP BY ?y } } }
[]
Clarification
Simple Question|Single Entity|Indirect
Q52607
P17
Q15617994
USER
Which administrative territory is that city a part of ?
(Q52607,P17,c(Q15617994))
action filter_type
action find
entity Q52607
relation P17
type Q15617994
['Q52607', 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?w WHERE { resource:Q52607 property:P17 ?w . ?w rdf:type ontology:Q15617994 }
Mar del Plata
action filter_type
action find
entity Mar del Plata
relation country
type designation for an administrative territorial entity
['Mar del Plata', 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?w WHERE { resource:Mar_del_Plata property:country ?w . ?w rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Clarification for simple ques.
Q52607
SYSTEM
Did you mean Mar del Plata ?
Q52607 Q1486
(Q52607,P17,c(Q15617994)) (Q1486,P17,c(Q15617994))
[ANSWER]
['Q52607', 'P17', {'concept': 'Q15617994'}] ['Q1486', 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?w WHERE { resource:Q52607 property:P17 ?w . ?w rdf:type ontology:Q15617994 }
Mar del Plata Buenos Aires
Did you mean Mar del Plata ?
Mar del Plata
['Mar del Plata', 'country', {'concept': 'designation for an administrative territorial entity'}] ['Buenos Aires', 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?w WHERE { resource:Mar_del_Plata property:country ?w . ?w rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Simple Question (Coreferenced)
USER
Yes
(Q52607,P17,c(Q15617994))
['Q52607', 'P17', {'concept': 'Q15617994'}]
['Mar del Plata', 'country', {'concept': 'designation for an administrative territorial entity'}]
[]
Q414
SYSTEM
Argentina
Q414
(Q52607,P17,c(Q15617994))
action filter_type
action find
entity Q52607
relation P17
type Q15617994
The [ANSWER] is that city a part of
['Q52607', 'P17', {'concept': 'Q15617994'}]
SELECT DISTINCT ?w WHERE { resource:Q52607 property:P17 ?w . ?w rdf:type ontology:Q15617994 }
Argentina
The Argentina is that city a part of
Argentina
action filter_type
action find
entity Mar del Plata
relation country
type designation for an administrative territorial entity
['Mar del Plata', 'country', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?w WHERE { resource:Mar_del_Plata property:country ?w . ?w 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
Q414 Q750 Q77
P47
Q15617994
USER
Does that administrative territory have an adjacent border with Bolivia and Uruguay ?
(Q414,P47,Q750) (Q414,P47,Q77)
action is_in
entity Q414
action intersection
action find_reverse
entity Q750
relation P47
action find_reverse
entity Q77
relation P47
['Q414', 'P47', 'Q750'] ['Q414', 'P47', 'Q77']
ASK WHERE { resource:Q414 property:P47 resource:Q750 . resource:Q414 property:P47 resource:Q77 }
Argentina Bolivia Uruguay
action is_in
entity Argentina
action intersection
action find_reverse
entity Bolivia
relation shares border with
action find_reverse
entity Uruguay
relation shares border with
['Argentina', 'shares border with', 'Bolivia'] ['Argentina', 'shares border with', 'Uruguay']
ASK WHERE { resource:Argentina property:shares_border_with resource:Bolivia . resource:Argentina property:shares_border_with resource:Uruguay }
[]
designation for an administrative territorial entity
SYSTEM
YES
(Q414,P47,Q750) (Q414,P47,Q77)
action is_in
entity Q414
action intersection
action find_reverse
entity Q750
relation P47
action find_reverse
entity Q77
relation P47
[ANSWER]
['Q414', 'P47', 'Q750'] ['Q414', 'P47', 'Q77']
ASK WHERE { resource:Q414 property:P47 resource:Q750 . resource:Q414 property:P47 resource:Q77 }
Yes
action is_in
entity Argentina
action intersection
action find_reverse
entity Bolivia
relation shares border with
action find_reverse
entity Uruguay
relation shares border with
['Argentina', 'shares border with', 'Bolivia'] ['Argentina', 'shares border with', 'Uruguay']
ASK WHERE { resource:Argentina property:shares_border_with resource:Bolivia . resource:Argentina property:shares_border_with resource:Uruguay }
[]