Redland Smushing

Some time — actually more than a year — ago i wrote a smusher for Redland that works by rewriting nodes based on identity inference.

To begin with, it handled only IFP’s, owl:InverseFunctionalProperty, but the other day I needed it to be able to handle FP’s, owl:FunctionalProperty, as well.

A classic example of an IFP is foaf:homepage — only one resource can have some specific URI as its homepage, which is handy for identity reasoning across the Web. Just as useful is the somewhat recently added property foaf:primaryTopic, which is an FP — if a page is described in more than one place, each with a seemingly different primary topic, it can be inferred that the two “topics” are actually just one, handy when identifying movies, since almost all movies have a page describing it at the Internet Movie Data Base.

The smusher is written in C, isn’t heavily commented, has been used elsewhere without problems, and works by finding IFP’s and FP’s in the model it is smushing or by being passed a specific property to smush on — a nasty way of testing is to pass it rdf:type

Building it should be somewhat straight forward, but the accompanying Makefile might help out here and there.

Note: This entry — as all entries in the Release category — will serve as a changelog (you can subscribe to its RSS feed if you want to make sure you don’t miss out on any updates).

The current version is 0.21 (released 2005-03-27).

Changes since 0.20:
  • Reworked rewriting process to avoid database deadlocks.

5 thoughts on “Redland Smushing

  1. Excuse my ignorance on this, but would it be straightforward to set up to call from Python? I assume swig enables you to do this kind of thing, but it’s new territory for me.

  2. Yeah I vaguely remember Morten and I discussed this in Tuscany and that applying the OWL IFP/FP inference rules for some properties should be user-configurable. Not to the extent of a full rules engine but somewhere in between. It should be a method on the model class but I’m not sure whether it deserves something more substantial or just add a quick hack. Presumably it could use knowledge in the graph of { ?r a owl:InverseFunctionalProperty } etc. to find the appropriate properties, and then all you’d need would be to run the rule forward.

    But I’m wittering on…

Comments are closed.