pythonrdflibturtle-rdfn3

Execute N3 rules on top of a Turtle file using Python


I have a turtle RDF file that contains all information related to an ontology and some instances and an N3 file that has different rules.

My goal is to execute the N3 rules on top of the Turtle file. Is it possible to use RDFLib (Python library) or any other library to do this task?


Solution

  • I think so using RDFLib: just parse the Turtle data first and then the N3 file afterwards into the same Graph. Be sure to use a formula-aware store. The default "memory" store is formula-aware.