Simple Question (Direct)
Simple Question
Q2644517
P27
Q15617994
USER
Which administrative territory is the native country of Alfonso Castaldi ?
(Q2644517,P27,c(Q15617994))
action filter_type
action find
entity Q2644517
relation P27
type Q15617994
['Q2644517', 'P27', {'concept': 'Q15617994'}]
SELECT DISTINCT ?o WHERE { resource:Q2644517 property:P27 ?o . ?o rdf:type ontology:Q15617994 }
Alfonso Castaldi
action filter_type
action find
entity Alfonso Castaldi
relation country of citizenship
type designation for an administrative territorial entity
['Alfonso Castaldi', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?o WHERE { resource:Alfonso_Castaldi property:country_of_citizenship ?o . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q218
SYSTEM
Romania
Q218
(Q2644517,P27,c(Q15617994))
action filter_type
action find
entity Q2644517
relation P27
type Q15617994
The [ANSWER] is the native country of Alfonso Castaldi
['Q2644517', 'P27', {'concept': 'Q15617994'}]
SELECT DISTINCT ?o WHERE { resource:Q2644517 property:P27 ?o . ?o rdf:type ontology:Q15617994 }
Romania
The Romania is the native country of Alfonso Castaldi
Romania
action filter_type
action find
entity Alfonso Castaldi
relation country of citizenship
type designation for an administrative territorial entity
['Alfonso Castaldi', 'country of citizenship', {'concept': 'designation for an administrative territorial entity'}]
SELECT DISTINCT ?o WHERE { resource:Alfonso_Castaldi property:country_of_citizenship ?o . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Simple Question (Direct)
Simple Question|Single Entity
Q2644517
P106
Q12737077
USER
What do Alfonso Castaldi do for a living ?
(Q2644517,P106,c(Q12737077))
action filter_type
action find
entity Q2644517
relation P106
type Q12737077
['Q2644517', 'P106', {'concept': 'Q12737077'}]
SELECT DISTINCT ?h WHERE { resource:Q2644517 property:P106 ?h . ?h rdf:type ontology:Q12737077 }
Alfonso Castaldi
action filter_type
action find
entity Alfonso Castaldi
relation occupation
type occupation
['Alfonso Castaldi', 'occupation', {'concept': 'occupation'}]
SELECT DISTINCT ?h WHERE { resource:Alfonso_Castaldi property:occupation ?h . ?h rdf:type ontology:occupation }
[]
occupation
Q36834 Q1622272 Q158852
SYSTEM
composer, university teacher, conductor
Q158852 Q16145150 Q36834 Q1622272
(Q2644517,P106,c(Q12737077))
action filter_type
action find
entity Q2644517
relation P106
type Q12737077
Alfonso Castaldi do for a living [ANSWERS]
['Q2644517', 'P106', {'concept': 'Q12737077'}]
SELECT DISTINCT ?h WHERE { resource:Q2644517 property:P106 ?h . ?h rdf:type ontology:Q12737077 }
conductor music educator composer university teacher
Alfonso Castaldi do for a living composer, university teacher and conductor
composer university teacher conductor
action filter_type
action find
entity Alfonso Castaldi
relation occupation
type occupation
['Alfonso Castaldi', 'occupation', {'concept': 'occupation'}]
SELECT DISTINCT ?h WHERE { resource:Alfonso_Castaldi property:occupation ?h . ?h rdf:type ontology:occupation }
[]
Simple Question (Ellipsis)
only subject is changed, parent and predicate remains same
Q113608
Q12737077
USER
And what about Elfie Stejskal?
(Q113608,P106,c(Q12737077))
action filter_type
action find
entity Q113608
relation P106
type Q12737077
['Q113608', 'P106', {'concept': 'Q12737077'}]
SELECT DISTINCT ?k WHERE { resource:Q113608 property:P106 ?k . ?k rdf:type ontology:Q12737077 }
Elfie Stejskal
action filter_type
action find
entity Elfie Stejskal
relation occupation
type occupation
['Elfie Stejskal', 'occupation', {'concept': 'occupation'}]
SELECT DISTINCT ?k WHERE { resource:Elfie_Stejskal property:occupation ?k . ?k rdf:type ontology:occupation }
[]
occupation
Q36180
SYSTEM
writer
Q36180
(Q113608,P106,c(Q12737077))
action filter_type
action find
entity Q113608
relation P106
type Q12737077
[ANSWER]
['Q113608', 'P106', {'concept': 'Q12737077'}]
SELECT DISTINCT ?k WHERE { resource:Q113608 property:P106 ?k . ?k rdf:type ontology:Q12737077 }
writer
writer
action filter_type
action find
entity Elfie Stejskal
relation occupation
type occupation
['Elfie Stejskal', 'occupation', {'concept': 'occupation'}]
SELECT DISTINCT ?k WHERE { resource:Elfie_Stejskal property:occupation ?k . ?k rdf:type ontology:occupation }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q1945515 Q218
P47
Q56061
USER
Which administrative territories are adjacent to Romania or Sangrur district ?
OR((Q218,P47,c(Q56061)), (Q1945515,P47,c(Q56061)))
action filter_type
action union
action find
entity Q218
relation P47
action find
entity Q1945515
relation P47
type Q56061
{'OR': [['Q218', 'P47', {'concept': 'Q56061'}], ['Q1945515', 'P47', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?z WHERE { { { resource:Q218 property:P47 ?z } UNION { resource:Q1945515 property:P47 ?z } } . ?z rdf:type ontology:Q56061 }
Sangrur district Romania
action filter_type
action union
action find
entity Romania
relation shares border with
action find
entity Sangrur district
relation shares border with
type administrative territorial entity
{'OR': [['Romania', 'shares border with', {'concept': 'administrative territorial entity'}], ['Sangrur district', 'shares border with', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?z WHERE { { { resource:Romania property:shares_border_with ?z } UNION { resource:Sangrur_district property:shares_border_with ?z } } . ?z rdf:type ontology:administrative_territorial_entity }
[]
administrative territorial entity
Q2353293 Q458
SYSTEM
Barnala district, European Union
Q2353293 Q458
OR((Q218,P47,c(Q56061)), (Q1945515,P47,c(Q56061)))
action filter_type
action union
action find
entity Q218
relation P47
action find
entity Q1945515
relation P47
type Q56061
[ANSWERS] are adjacent to Romania or Sangrur district
{'OR': [['Q218', 'P47', {'concept': 'Q56061'}], ['Q1945515', 'P47', {'concept': 'Q56061'}]]}
SELECT DISTINCT ?z WHERE { { { resource:Q218 property:P47 ?z } UNION { resource:Q1945515 property:P47 ?z } } . ?z rdf:type ontology:Q56061 }
Barnala district European Union
Barnala district and European Union are adjacent to Romania or Sangrur district
Barnala district European Union
action filter_type
action union
action find
entity Romania
relation shares border with
action find
entity Sangrur district
relation shares border with
type administrative territorial entity
{'OR': [['Romania', 'shares border with', {'concept': 'administrative territorial entity'}], ['Sangrur district', 'shares border with', {'concept': 'administrative territorial entity'}]]}
SELECT DISTINCT ?z WHERE { { { resource:Romania property:shares_border_with ?z } UNION { resource:Sangrur_district property:shares_border_with ?z } } . ?z rdf:type ontology:administrative_territorial_entity }
[]
Logical Reasoning (All)
Logical|Union|Single_Relation
Q6964276 Q1945515
P17
Q15617994
USER
Which administrative territories do Sangrur district or Nant Gwernol railway station belong to ?
OR((Q1945515,P17,c(Q15617994)), (Q6964276,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q1945515
relation P17
action find
entity Q6964276
relation P17
type Q15617994
{'OR': [['Q1945515', 'P17', {'concept': 'Q15617994'}], ['Q6964276', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?o WHERE { { { resource:Q1945515 property:P17 ?o } UNION { resource:Q6964276 property:P17 ?o } } . ?o rdf:type ontology:Q15617994 }
Nant Gwernol railway station Sangrur district
action filter_type
action union
action find
entity Sangrur district
relation country
action find
entity Nant Gwernol railway station
relation country
type designation for an administrative territorial entity
{'OR': [['Sangrur district', 'country', {'concept': 'designation for an administrative territorial entity'}], ['Nant Gwernol railway station', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?o WHERE { { { resource:Sangrur_district property:country ?o } UNION { resource:Nant_Gwernol_railway_station property:country ?o } } . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
designation for an administrative territorial entity
Q668 Q145
SYSTEM
India, United Kingdom
Q668 Q145
OR((Q1945515,P17,c(Q15617994)), (Q6964276,P17,c(Q15617994)))
action filter_type
action union
action find
entity Q1945515
relation P17
action find
entity Q6964276
relation P17
type Q15617994
[ANSWERS] Sangrur district or Nant Gwernol railway station belong to
{'OR': [['Q1945515', 'P17', {'concept': 'Q15617994'}], ['Q6964276', 'P17', {'concept': 'Q15617994'}]]}
SELECT DISTINCT ?o WHERE { { { resource:Q1945515 property:P17 ?o } UNION { resource:Q6964276 property:P17 ?o } } . ?o rdf:type ontology:Q15617994 }
India United Kingdom
India and United Kingdom Sangrur district or Nant Gwernol railway station belong to
India United Kingdom
action filter_type
action union
action find
entity Sangrur district
relation country
action find
entity Nant Gwernol railway station
relation country
type designation for an administrative territorial entity
{'OR': [['Sangrur district', 'country', {'concept': 'designation for an administrative territorial entity'}], ['Nant Gwernol railway station', 'country', {'concept': 'designation for an administrative territorial entity'}]]}
SELECT DISTINCT ?o WHERE { { { resource:Sangrur_district property:country ?o } UNION { resource:Nant_Gwernol_railway_station property:country ?o } } . ?o rdf:type ontology:designation_for_an_administrative_territorial_entity }
[]
Quantitative Reasoning (All)
Quantitative|Atleast/ Atmost/ Approx. the same/Equal|Mult. entity type
P706
Q107425 Q15324 Q15617994
USER
Which administrative territories are located in exactly 2 landscapes or bodies of water ?
(c(Q15617994),P706,c(Q107425)|c(Q15324))
action equal
action union
action find_tuple_counts
relation P706
type Q15617994
type Q107425
action find_tuple_counts
relation P706
type Q15617994
type Q15324
value 2
[{'concept': 'Q15617994'}, 'P706', [{'concept': 'Q107425'}, {'concept': 'Q15324'}]]
SELECT DISTINCT ?y WHERE { FILTER ( ?g = 2 ) . { SELECT DISTINCT ?y ( COUNT ( ?x ) AS ?g ) WHERE { { ?y property:P706 ?x . ?y rdf:type ontology:Q15617994 . ?x rdf:type ontology:Q107425 } UNION { ?y property:P706 ?x . ?x rdf:type ontology:Q15324 . ?y rdf:type ontology:Q15617994 } } GROUP BY ?y } }
action equal
action union
action find_tuple_counts
relation located on terrain feature
type designation for an administrative territorial entity
type landscape
action find_tuple_counts
relation located on terrain feature
type designation for an administrative territorial entity
type body of water
value 2
[{'concept': 'designation for an administrative territorial entity'}, 'located on terrain feature', [{'concept': 'landscape'}, {'concept': 'body of water'}]]
SELECT DISTINCT ?y WHERE { FILTER ( ?g = 2 ) . { SELECT DISTINCT ?y ( COUNT ( ?x ) AS ?g ) WHERE { { ?y property:located_on_terrain_feature ?x . ?y rdf:type ontology:designation_for_an_administrative_territorial_entity . ?x rdf:type ontology:landscape } UNION { ?y property:located_on_terrain_feature ?x . ?x rdf:type ontology:body_of_water . ?y rdf:type ontology:designation_for_an_administrative_territorial_entity } } GROUP BY ?y } }
[]
landscape body of water designation for an administrative territorial entity
Q3193
SYSTEM
Ostseebad Insel Poel
Q3193
(c(Q15617994),P706,c(Q107425)|c(Q15324))
action equal
action union
action find_tuple_counts
relation P706
type Q15617994
type Q107425
action find_tuple_counts
relation P706
type Q15617994
type Q15324
value 2
[ANSWER] is located in exactly 2 landscapes or bodies of water
[{'concept': 'Q15617994'}, 'P706', [{'concept': 'Q107425'}, {'concept': 'Q15324'}]]
SELECT DISTINCT ?y WHERE { FILTER ( ?g = 2 ) . { SELECT DISTINCT ?y ( COUNT ( ?x ) AS ?g ) WHERE { { ?y property:P706 ?x . ?y rdf:type ontology:Q15617994 . ?x rdf:type ontology:Q107425 } UNION { ?y property:P706 ?x . ?x rdf:type ontology:Q15324 . ?y rdf:type ontology:Q15617994 } } GROUP BY ?y } }
Ostseebad Insel Poel
Ostseebad Insel Poel is located in exactly 2 landscapes or bodies of water
Ostseebad Insel Poel
action equal
action union
action find_tuple_counts
relation located on terrain feature
type designation for an administrative territorial entity
type landscape
action find_tuple_counts
relation located on terrain feature
type designation for an administrative territorial entity
type body of water
value 2
[{'concept': 'designation for an administrative territorial entity'}, 'located on terrain feature', [{'concept': 'landscape'}, {'concept': 'body of water'}]]
SELECT DISTINCT ?y WHERE { FILTER ( ?g = 2 ) . { SELECT DISTINCT ?y ( COUNT ( ?x ) AS ?g ) WHERE { { ?y property:located_on_terrain_feature ?x . ?y rdf:type ontology:designation_for_an_administrative_territorial_entity . ?x rdf:type ontology:landscape } UNION { ?y property:located_on_terrain_feature ?x . ?x rdf:type ontology:body_of_water . ?y rdf:type ontology:designation_for_an_administrative_territorial_entity } } GROUP BY ?y } }
[]
Verification (Boolean) (All)
Verification|2 entities, both direct
Q3193 Q183
P17
Q1048835
USER
Is Ostseebad Insel Poel located in Germany ?
(Q3193,P17,Q183)
action is_in
entity Q183
action find
entity Q3193
relation P17
['Q3193', 'P17', 'Q183']
ASK WHERE { resource:Q3193 property:P17 resource:Q183 }
Ostseebad Insel Poel Germany
action is_in
entity Germany
action find
entity Ostseebad Insel Poel
relation country
['Ostseebad Insel Poel', 'country', 'Germany']
ASK WHERE { resource:Ostseebad_Insel_Poel property:country resource:Germany }
[]
political territorial entity
SYSTEM
YES
(Q3193,P17,Q183)
action is_in
entity Q183
action find
entity Q3193
relation P17
[ANSWER]
['Q3193', 'P17', 'Q183']
ASK WHERE { resource:Q3193 property:P17 resource:Q183 }
Yes
action is_in
entity Germany
action find
entity Ostseebad Insel Poel
relation country
['Ostseebad Insel Poel', 'country', 'Germany']
ASK WHERE { resource:Ostseebad_Insel_Poel property:country resource:Germany }
[]