| Algorithm 2: Obtaining the artwork The_Starry_Night. | 
| 1 import RDF libraries | 
| 2 g = Graph() | 
| 3 g.read(“database_emotions.ttl”, format=“ttl”) | 
| 4 g.add_namespace(“emo”, “http://www.emonto.org/ (accessed on 18 December 2020)”) | 
| 5 qres = g.query(“SELECT ?emotion_l | 
| 6 WHERE { | 
| 7 ?emotion a emo:Emotion ; | 
| 8 ?emotion emo:emotionValue | 
| 9 ?emotion_l . | 
| 10 ?event a emo:Event ; | 
| 11 ?event emo:produces ?emotion ; | 
| 12 ?event emo:isCausedBy | 
| 13 ?object. | 
| 14 ?object a emo:Object ; | 
| 15 ?object rdfs:label “The_Starry_Night” . | 
| 16 }”) |