Advertisement
Guest User

Untitled

a guest
Apr 24th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. from rdflib import Graph
  2.  
  3. g = Graph()
  4. g.parse("/Users/SUV/Desktop/AlfredOWL2.owl")
  5.  
  6. qres = g.query("""PREFIX ex:<http://www.semanticweb.org/suv/ontologies/2015/3/alfredowl/> SELECT ?Mood ?Action WHERE {
  7. ?Mood rdf:type ex:Mood .
  8. ?Mood ex:possible ?Action}""")
  9.  
  10. for row in qres:
  11. print row.Mood, row.Action
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement