Skip to content

pnnl/rdf-engine

Repository files navigation

PyPI - Status

RDF-Engine

Why?

Motivation: This was developed as part of BIM2RDF where the conversion from BIM to RDF is framed as 'mapping rules'.

How?

Rules are processes that generate quads. They are simply applied until no new quads are produced. Oxigraph is used to store data.

A rule is defined as a function that takes an Oxigraph instance and returns quads.

Features

  • Handling of anonymous/blank nodes: They can be derandomized.
  • Oxigraph can handle RDF-star data and querying. However, RDF-star is derandomized for each graph in a rule. RDF-star data is expected to be of form <<data.subject data.predicate data.object >> meta.predicate meta.object.

Usage

The package can be obtained from PyPi. Note the CLI is optional: rdf-engine[cli].

A 'program' is defined as a sequence of engine runs initialized by a `db'. Each engine run takes:

  • (engine) params
  • and a list of rules. Each rule needs a module, maker, and params. See program example in test script.

Development Philosophy

  • KISS: It should only address executing rules. Therefore, the code is expected to be feature complete (without need for adding more 'features').
  • Minimal dependencies: follows from above.
  • Explicit > Implicit: Parameters should be specificed (explicitly).

About

A rules engine for RDF graph data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages