RDFS and OWL 2 RL generator service

If you intend to use this service regularly on large scale, consider downloading the package and use it locally. Storing a (conceptually) “cashed” version of the generated RDF, instead of referring to the live service, might also be an alternative to consider to avoid overloading this server…

What is it?

The service performs a forward chaining on RDF files using either RDFS or the “derivation rules” of OWL 2 RL, possibly adding axiomatic triples, too. The service returns the expanded graph that includes all possible extra triples defined by these specifications. The code relies on 22nd of September, 2009 version of OWL 2 RL, and passes all official tests as provided by the OWL Working Group that aimed at the OWL 2 RL derivation rules. (See caveats below…).

The service generates all possible triples, even in case an inconsitency occurs (eg, using owl:sameAs and owl:differentFrom on the same subject/object pairs). An error information is added into the generated graph in the form of a blank node with properties referring to the error itself.

Online version of the service

Expand RDF
Basic options for simple usage
Output format:  Turtle  RDF/XML    
OWL 2 RL + RDFS closure without axioms:  yes  no, make finer choices below Use both the OWL 2 RL Ruleset and the RDF and RDFS Entailement Rules, without axiomatic triples. If set to 'no', then the additional options below are considered
Input format:  Turtle  RDF/XML If not set, the suffix of the URI decides, i.e., .rdf for RDF/XML and .ttl for Turtle, respectively. (Yes, this is not nice, the header should be used. On the 'some day pile'.)
Detailed options
OWL 2 RL closure:  yes  no Use the OWL 2 RL Ruleset
RDFS closure:  yes  no Use the RDF and RDFS Entailement Rules
Axiomatic triples:  yes  no Add the axiomatic triples of RDFS and OWL, respectively, before the execution of the rules. This does not include the datatype axiomatic rules, that is governed via a different option.
Datatype axiomatic triples:  yes  no Add the datatype related axiomatic triples of RDFS and OWL, respectively, before the execution of the rules.
OWL extras:  yes  no Execute some extra OWL specific rules, see below. Note that this option has no effect if the OWL Closure option is set to 'no'. At the moment, these extras include the owl:rational datatypes, self-restrictions, and datatype restrictions.

Note that, if OWL 2 RL is used, the owl:imports property is also interpreted prior to the closure. The returned graph would include all the triples for the transitive closure of the import actions.

Additional notes

This is not a production quality service! Essentially, this is simply a proof-of-concepts implementation, naïvely simple and not optimized, ie, probably not usable for larger graphs (e.g., all owl:sameAs triples are simply added to the output graph; more sophisticated implementation would produce those triples only at query time). However, as a proof-of-concepts implementation it has its value nevertheless: the core engine has been implemented on top of a standard, off-the-shelf RDF library (RDFLib) without any sophisticated rule engine, and it did not require months’ of work (the most complex part was to handle the datatypes properly, simply because the underlying RDFLib implentation was fairly incomplete in this respect). This being one of the goals of OWL 2 RL, it is a good testimony to its feasibility…

There is a bug in the underlying Turtle parser of RDFLib, though, that was not handled. The abbreviations of double datatypes of the form 1.234E56 (to stand for "1.234E56"^^xsd:double) throws, unfortunately, a parsing exception. Better to keep away from that…


The module is also usable by incorporating it to a RDFLib application. The code is available for download from GitHub, and it includes the Python package, plus examples for the usage of the package as part of a Web based service or on a command line. The documentation of the package is also available on-line.

Ivan Herman, (ivan@ivan-herman.net)
Last revised: 2012-04-25 (see in RDF)

This software is available for use under the W3C® SOFTWARE NOTICE AND LICENSE and can be downloaded from the CVS depository.

'Valid XHTML + RDFa' button