The Drupal Relationship Manager Package

Revised: Sept 20 2007

After a great burst of initial activity with the NINA project and then with Dan Morrison driving the Relationship Manager project, there was good momentum to semantic web projects for Drupal. But the efforts seem to have gone into something like a hiatus during the the last year or so.

The good news is that there seems to be persistent interest in the idea of a Drupal inference engine. While not a full blown inference engine, the Relationship Manager was a big step forward toward at working rules engine of some sort.

 

Overview

The essential purpose of the Relationship Manager module is "to allow free-form links between nodes". The basic unit of information about relationships between nodes is "predicates". They are expressed in what is called tuples, that is 3-tuples in the form:

[ Something *HAS-RELATIONSHIP-TO* Something else ]

A predicate is an instance of the relationship in the middle, as if it were part of a sentence ( that is, Subject Predicate Object ). A common example is the rule [ PERSON AUTHOR-OF BOOK ] or alternately, [ PERSON AUTHORED BOOK ]. An instance of 3-tuple would be [ Mark Twain AUTHOR-OF Life on the Mississippi ].

In the Drupal taxonomy module, one can only say that there is an association between a page and its subject, but one can not specify what that relationship is. One might think of the situation as "Mark Twain" belonging to the category "People" and "Life on the Mississippi" as belonging to the category "Books". One would be able to use features of the Taxonomy module to create an association between the categories "Persons" and "Books", but there would be no way to create a specific AUTHOR-OF association between "Mark Twain" and "Life on the Mississippi".

The following diagram illustrates the basic workings of RDF versus Drupal Taxonomy.

RDF-Taxonomy Diagram

 

The diagram shows "Mark Twain" as a member of the category "People", but rarely does one do that sort of thing in practice. "Person" is an innate property of Mark Twain, not an associated subject. A simple taxonomy lacks expressive power. Nonetheless, an actual taxonomy will often contain many "implied" relationships. Most readers will understand without reflection that a taxonomy of projects implies that child subjects such as "paint the house" are constituent parts of the project. They must obey the rules appropriate for collections of activities and sequences of tasks. On the other hand, if the subject were American Writers and the child subject Mark Twain, a different set of rules and relationships would be implied.

 

Pluggable Ontologies

From the Relationship Manager project page:

Ontologies are sets of terms, DEFINITIONS of predicates, usually containing a little internal logic defining how these terms relate to one another. A 'geneology' ontology may define that the phrase "is parent of" is a meaningful relationship two things (people) may have to each other. It would also include the rule that "is child of" is a required reciprocal relationship.

Note that the "DEFINITIONS of predicates" is not the definition of the 3-tuple, such as [ Mark Twain AUTHOR-OF Life on the Mississippi ] or even [ PERSON AUTHOR-OF BOOK ]. It is information about the properties of relationships themselves, that is types of relationships allowed between different relationships. Examples are similarity relationships ( AUTHOR-OF and AUTHORED ), or reflexive relationships ( parent-of and child-of ) and opposites or reciprocals, etc. In the grand scene of things, this is meta-meta data.

The table shows the assertions made at each level of abstraction.

 

Meta Meta Data

AUTHOR-OF *HAS-RECIPROCAL* AUTHORED-BY
AUTHOR-OF *HAS-SIMILAR* AUTHORED

Meta Data

PERSON AUTHOR-OF BOOK

Data

Mark Twain AUTHOR-OF Life on the Mississippi

 

Generally, the lower data level will be more volatile than at the relative meta level. At the meta meta level, the assertions are so universal that formal mathematical models are applicable - almost a higher standard. Most RDF standards reside at the meta-data level describing actual instances of RDF tuples as their subject. However, RDF also includes meta-meta-data ( meta-rules ) describing the characteristics relationships.

For instance, a meta-rule for a reciprocal relationship might be in the form of:

 

IF [ instance-a RELATIONSHIP-1 instance-B ] is true AND
[ RELATIONSHIP-1 *HAS-RECIPROCAL* RELATIONSHIP-2 ] is true
THEN [ instance-B RELATIONSHIP-2 instance-A ] is also true.

 

In practice, most rules of this sort are controlled by the RDF or OWL specifications and even much of the meta-data such as relationships between authors and books is in the form of shared ontologies distributed under the banner of RDF standards.

The documentation states that the existing Relationship Manager package has some support for inference engines.

Depending on the ontology in use, extra statements can be deduced about a resource. This is to be developed to support OWL web ontology and SPARQL RDF Query Language.

Modules in the Package

The Relationship Manager gets called a 'module' at times, but it is really a package of modules.

Several extra modules are provided to expose different features of the system. Not all the extras are needed for all uses, so these are distributed as helper modules. They do all however rely on the 'relationship.module' to be available. Each module has extensive documentation of its own, but here's an overview.

  • The metadata_blocks.module "exposes a default 'all metadata' block which will display all relationship links (and literals) currently associated with whatever node it is displayed alongside".
  • The ontology_navigation.module "defines a set of navigational relationships, as well as publishing a small any block and modifying the rendering of a node to provide 'book.module' type buttons at the bottom of a 'page'. It is basically proof-of-concept ...".
  • The ontology_revision_control.module "defines a set of document management type terms".
  • The ontology_rdf.module "provides admin functionality to expose the underlying data structures of the predicates in use, allows import and export of ontologies from remote sources (like the Dublin Core) and provides a true RDF representation of metadata for all nodes".

The Relationship Manager was a good start, but clearly much remains to be done.