Competency Questions
Our competency questions investigate a great range of topics, spanning from the data about the Avatar lore to real instances of culture, history, philosophy and religion.
Question.1
What nation has the most benders?
Expected answer: Fire Nation
query1 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?nation where { ?person av:from ?nation. ?person rdf:type av:Person. FILTER EXISTS { {?person av:has_ability av:Air_Bending} UNION {?person av:has_ability av:Fire_Bending} UNION {?person av:has_ability av:Water_Bending} UNION {?person av:has_ability av:Earth_Bending} } } GROUP BY ?nation ORDER BY DESC(COUNT(?nation)) LIMIT 1 ''' result = automaticallyAvatargraph.query(query1) for item in result: print(item["nation"])
Result:
Question n.2
What nation has the fewest benders?
Expected answer: Earth Kingdom
query2 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?nation where { ?person av:from ?nation. ?person rdf:type av:Person. FILTER EXISTS { {?person av:has_ability av:Air_Bending} UNION {?person av:has_ability av:Fire_Bending} UNION {?person av:has_ability av:Water_Bending} UNION {?person av:has_ability av:Earth_Bending} } } GROUP BY ?nation ORDER BY (COUNT(?nation)) LIMIT 1 ''' result = automaticallyAvatargraph.query(query2) for item in result: print(item["nation"])
Question n.3
Who is a non-bender?
Expected answer: Sokka, Asami Sato
query3 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select distinct ?person where { ?person av:has_ability ?obj. FILTER NOT EXISTS { {?person av:has_ability av:Air_Bending} UNION {?person av:has_ability av:Fire_Bending} UNION {?person av:has_ability av:Water_Bending} UNION {?person av:has_ability av:Earth_Bending} } } ''' result = automaticallyAvatargraph.query(query3) for item in result: print(item["person"])
Result:
https://www.avatar.org/Sokka
https://www.avatar.org/Asami_Sato
Question n.4
Who knows hand-combat?
Expected answer: Toph, Sokka, Azula, Uncle Iroh, Korra, Asami Sato, Mako, Bolin, Tenzin
query4 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?person where { ?person av:has_ability av:Hand_Combat } ''' result = automaticallyAvatargraph.query(query4) for item in result: print(item["person"])
a.https://www.avatar.org/Toph b.https://www.avatar.org/Sokka c.https://www.avatar.org/Azula d.https://www.avatar.org/Uncle_Iroh e.https://www.avatar.org/Korra f.https://www.avatar.org/Asami_Sato g.https://www.avatar.org/Mako h.https://www.avatar.org/Bolin i.https://www.avatar.org/Tenzin
Question n.5
Airbending has the fighting style Taijiquan.
Expected answer: False
query5 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ ASK {av:Air_Bending av:has_fighting_style "Taijiquan"} ''' result = automaticallyAvatargraph.query(query5) for item in result: print(item)
Result:
False.
Question n.6
What was the White Lotus inspired by?
Expected answer: The White Lotus Rebellion
query6 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?event where { av:White_Lotus av:inspired_by ?event } ''' result = automaticallyAvatargraph.query(query6) for item in result: print(item["event"])
Question.7
query7 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select (COUNT(*) AS ?sub) where { ?sub av:culturally_derives_from av:Hinduism } ''' result = automaticallyAvatargraph.query(query7) for item in result: print(item["sub"])
How many times is Hinduism referenced in the universe?
Expected answer: 6
Result:
6
Question n.8
Where do all the elements culturally derive from?
Expected answer: Hinduism, Buddhism
query8 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?topic where { av:Fire av:culturally_derives_from ?topic. av:Air av:culturally_derives_from ?topic. av:Water av:culturally_derives_from ?topic. av:Earth av:culturally_derives_from ?topic } ''' result = automaticallyAvatargraph.query(query8) for item in result: print(item["topic"])
Question n.9
What fighting-style is Earth Bending based on?
Expected answer: Hun Gar Style, Nanquan, Chow Gar Southern Praying Mantis, Wing Chun
Hun_Gar_Style Nanquan Chow_Gar_Southern_Praying_Mantis Wing_Chun
query9 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?style where { av:Earth_Bending av:has_fighting_style ?style } ''' result = automaticallyAvatargraph.query(query9) for item in result: print(item["style"])
Question n.10
Who are the Avatars' enemies?
Expected answer: Combustion Man, Azula, Joo Dee, Liling, Long Feng, Ozai, Yakone, Zhao, Amon, Hou Ting, The Protester, Triple Threat Triad, Zaheer, Kuvira, Unalaq
https://www.avatar.org/Combustion_Man https://www.avatar.org/Azula https://www.avatar.org/Joo_Dee https://www.avatar.org/Liling https://www.avatar.org/Long_Feng https://www.avatar.org/Ozai https://www.avatar.org/Yakone https://www.avatar.org/Zhao https://www.avatar.org/Amon https://www.avatar.org/Hou_Ting https://www.avatar.org/The_Protester https://www.avatar.org/Triple_Threat_Triad https://www.avatar.org/Zaheer https://www.avatar.org/Kuvira https://www.avatar.org/Unalaq
query10 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?enemy where { {av:Aang av:is_enemy_of ?enemy} UNION {av:Korra av:is_enemy_of ?enemy} } ''' result = automaticallyAvatargraph.query(query10) for item in result: print(item["enemy"])
Question n.11
Which element grants you the ability of generating lighting?
Expected answer: Fire.
query11 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?element where { ?element av:has_feature "Lighting_Generation" } ''' result = automaticallyAvatargraph.query(query11) for item in result: print(item["element"])
Question n.12
Who did live troughout Aang and Korra's timelines?
Expected answer: Katara, Zuko, Toph, Kyoshi Warriors
https://www.avatar.org/Zuko https://www.avatar.org/Toph https://www.avatar.org/Katara https://www.avatar.org/Kyoshi_Warriors
query12 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?person where { ?person av:existed_in av:Aangs_Timeline. ?person av:existed_in av:Korras_Timeline } ''' result = automaticallyAvatargraph.query(query12) for item in result: print(item["person"])
Question n.13
Who is part of the GAang?
Expected answer: Sokka, Katara, Zuko, Toph, Appa, Aang
Result:
query13 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?person where { ?person av:existed_in av:Aangs_Timeline. ?person av:is_part_of av:Avatar_Circle } ''' result = automaticallyAvatargraph.query(query13) for item in result: print(item["person"])
https://www.avatar.org/Zuko https://www.avatar.org/Toph https://www.avatar.org/Aang https://www.avatar.org/Katara https://www.avatar.org/Sokka https://www.avatar.org/Appa
Question n.14
Who uses dual broadswords and belongs to the Fire Nation?
Expected answer: Zuko
Result:
query14 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?person where { ?person av:uses "Dual_Broad_Swords". ?person rdf:type av:Person } ''' result = automaticallyAvatargraph.query(query14) for item in result: print(item["person"])
Question n.15
Who has an animal companion?
Expected answer: Aang.
query15 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?person where { ?creature av:is_companion_of ?person } ''' result = automaticallyAvatargraph.query(query15) for item in result: print(item["person"])
Question n.16
Which creature is based on a lemur?
Expected answer: The Winged Lemur
query16 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?creature where { ?creature av:inspired_by av:Lemur } ''' result = automaticallyAvatargraph.query(query16) for item in result: print(item["creature"])
Question n.17
What event directly references the annexation of Tibet?
Expected answer: Fire Nation's Genocide against the Air Nomads
Result:
Fire_Nations_Genocide_against_Air_Nomads
query17 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?event where { av:Annexation_of_Tibet av:inspires ?event } ''' result = automaticallyAvatargraph.query(query17) for item in result: print(item["event"])
Question n.19
Which political groups are inspired by real life events?
Expected answer: Equalists, Red Lotus, Earth Empire
query19 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?group where { {?event rdf:type av:Belief} UNION {?event rdf:type av:Real_World_Timeline} ?event av:inspires ?group. ?group rdf:type av:Political_Group } ''' result = automaticallyAvatargraph.query(query19) for item in result: print(item["group"])
Question n.18
Which nations are known for propaganda?
Expected answer: Fire Nation, Earth Kingdom
query18 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?nation where { ?nation av:known_for "Propaganda" } ''' result = automaticallyAvatargraph.query(query18) for item in result: print(item["nation"])
Question n.20
What did happen during Aang's timeline?
Expected answer: The entire Aang's timeline.
Aang_escapes_with_Appa Aang_and_Appa_frozen_in_iceberg Arrival_of_Sozins_Comet Fire_Nations_Genocide_against_Air_Nomads Fire_Nation_attacks_the_Earth_Kingdom Fire_Nation_attacks_Water_Tribe Fire_Lord_Azulon_is_born Azulon_becomes_Fire_Lord Ozai_and_Iroh_are_born Long_Feng_is_Regent_of_Earth_Kingdom Prince_Zuko_is_born Princess_Yue_is_born Sokka_is_born Mai_is_born Princess_Azula_is_born Toph_is_born Siege_of_Ba_Sing_Se Ozai_becomes_Fire_Lord Start_of_Zukos_Exile Zuko_starts_hunting_the_Avatar Katara_and_Sokka_find_Aang Aang_starts_Water_Bending_Training Aang_starts_Fire_Bending_Training Fire_Nation_invades_Northern_Water_Tribe Admiral_Zhao_kills_Tui Yues_death Fire_Nation_conquers_Omashu Azula_starts_hunting_the_Avatar Toph_joins_GAang Aang_starts_Earth_Bending_Training Azula_conquers_Ba_Sing_Se Azula_kills_Aang Katara_brings_Aang_back_to_life Eclipse_Attack GAang_defeats_Fire_Nation_Forces Omashu_is_freed Zuko_joins_GAang Zuko_trains_Aang Ozai_becomes_Phoenix_King Azula_becomes_Fire_Lord The_White_Lotus_frees_Ba_Sing_Se Lion_Turtle_teaches_Aang_Energybending Zuko_and_Katara_defeat_Azula Ozai_attacks_Earth_Kingdom Toph_Sokka_and_Suki_defeat_Fire_Nations_Armada Avatar_Aang_defeats_Ozai Ozai_and_Azula_are_imprisoned Zuko_becomes_Fire_Lord
Result:
query20 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?event where { av:Aangs_Timeline av:has_event ?event } ''' result = automaticallyAvatargraph.query(query20) for item in result: print(item["event"])
Question n.21
Which character has the most friends?
Expected answer: Korra
Result:
query21 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?character where { ?character av:is_friend_of ?friend. ?character rdf:type av:Person } GROUP BY ?character ORDER BY DESC(COUNT(?character)) LIMIT 1 ''' result = automaticallyAvatargraph.query(query21) for item in result: print(item["character"])
Question n.22
Which character has the most enemies?
Expected answer: Toph
Result:
query22 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?character where { ?character av:is_enemy_of ?friend. ?character rdf:type av:Person } GROUP BY ?character ORDER BY DESC(COUNT(?character)) LIMIT 1 ''' result = automaticallyAvatargraph.query(query22) for item in result: print(item["character"])
Query n.23
Which character has the biggest family?
Expected answer: Tenzin
Result:
query23 = ''' prefix av: https://www.avatar.org/ prefix dbp: http://dbpedia.org/page/ prefix geo: https://www.geonames.org/ prefix owl1: https://www.w3.org/TR/owl-ref/ prefix viaf: https://viaf.org/viaf/ prefix wiki: https://www.wikidata.org/wiki/ select ?character where { ?character av:is_child_of ?parent. ?character av:is_sibling_of ?sibling. ?character av:is_parent_of ?child } GROUP BY ?character ORDER BY DESC(COUNT(?character)) LIMIT 1 ''' result = automaticallyAvatargraph.query(query23) for item in result: print(item["character"])