Suppose I am building a Linked Data client app based on Python and RDFLib, and I want to do some reasoning. Most likely I have a few vocabularies that are dear to my heart, and want to do RDFS reasoning with them, i.e. materialize superclass membership, superproperty values etc. I also want to handle owl:sameAs in instance data. Support for the rest of OWL is welcome but not essential.

The graphs I will be working with are rather small, let’s say on the order of 10,000 triples (all stored in memory), but I need to reason in real-time (e.g. my client is an end-user app that works with Linked Data) and so delays should be small.

But most importantly, the solution has to be as easy to use as possible. Ideally:

import reasoner

What are my best options?

What is the situation with other platforms/libraries? (Java doesn’t count as all reasoning tools seem to be designed for it)

asked 22 Jul '10, 22:37

Vasiliy%20Faronov's gravatar image

Vasiliy Faronov
accept rate: 21%

As for RDFLib, I'd suggest you take a look at FuXi. It was developed to directly address SW reasoning in Python with RDFLib. I'd read the end user manual. In addition to RDFS, it can handle OWL 2 RL, SPARQL entailment via both forward and backward chaining.

permanent link

answered 23 Jul '10, 02:28

chimezie's gravatar image

accept rate: 7%

FuXi seems promising, but so far I’ve been unable to make it work. I guess I’ll write to the mailing list detailing my misfortunes. Are there any practical examples around of using FuXi in the way I described?

(23 Jul '10, 07:45) Vasiliy Faronov Vasiliy%20Faronov's gravatar image

Yes, please email the mailing list. There are examples (http://groups.google.com/group/fuxi-discussion/browse_thread/thread/f57c0709fbbb0547) in the list of using the FuXi command-line, though it seems you are more interested in examples of the API.

(23 Jul '10, 12:36) chimezie chimezie's gravatar image

I’ve managed to get FuXi working, and although more difficult to set up, it seems much more efficient and flexible than RDFClosure. So I’m marking this as the answer.

(25 Jul '10, 19:59) Vasiliy Faronov Vasiliy%20Faronov's gravatar image

Okay, good to here. Please send any insights about how to make the install, documentation, etc. better to the mailing list.

(26 Jul '10, 00:08) chimezie chimezie's gravatar image

The code behind Ivan Herman's Online RDFS and OWL RL Reasoner can be downloaded at http://www.ivan-herman.net/Misc/2008/owlrl/. The last section of that page (where you can also find the download link) tells:

The module is also usable by incorporating it to a RDFLib application. The code is available for download 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.

permanent link

answered 23 Jul '10, 06:16

Michael%20Schneider's gravatar image

Michael Schn... ♦
accept rate: 34%

I’ve not yet tried RDFClosure, because it is not compatible with RDFLib 3.0, but the earlier RDFSClosure (which seems to now be a module inside the more complete RDFClosure) is somewhat slow. Being a “brute-force” approach as Ivan himself puts it, it takes a few seconds (on a modern desktop machine) to produce an RDFS-only closure for a small graph of real-world SIOC data + SIOC vocabulary description. I’m afraid this will be too long for some applications. (That said, it does seem to be the easiest approach at present.)

(23 Jul '10, 07:25) Vasiliy Faronov Vasiliy%20Faronov's gravatar image

Just checked RDFClosure-4.1. Computing the OWL 2 RL closure for a 1018 triple graph is intractable (killed off after a couple of minutes, the graph had 130,000+ triples by then). RDFS still computes in a couple of seconds, and doesn’t include owl:sameAs, of course.

(23 Jul '10, 08:36) Vasiliy Faronov Vasiliy%20Faronov's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 22 Jul '10, 22:37

question was seen: 4,500 times

last updated: 23 Jul '10, 06:16