I added some code that may help you.

It was Christiaan Fluit who said at the right time 25.10.2007 22:28 the following words:
Leo Sauermann wrote:
in practice, you may want to do inferencing at some point.
A kind of simple inferencing is to provide a mapping before you return 
the results to the user.
As the ontologies are static and known, you can realize this by 
iterating through all statements and changing the statements, replacing 
the predicates with super-predicates.

I would go for this solution:
* load all ontologies into a rdf2go model (they are available quite easy 
by the classes, such as NIE.getOntologyAsStream (or something like this)
* write a list of predicates you want to have "streamlined", for example 
"plaintext", "title"
* iterate through the model, listing all subproperties of these 
predicates, and make a mapping list that maps from the sub-properties 
(the specific ones you don't want) mapping to the generic superproperties.
then you should have something like
HashMap<URI, URI> subpropertyToSuperpropertyILike  ...

before returning the dataobjects to the user,
iterate through the rdf2go model once and replace the statements that 
have mappings in this HashMap.
Alltogether, the HashMap will probably contain about 50-100 entries, so 
it won't hurt too much,
the iterating and replacing process can be a littly time-consuming, but 
hopefully not much.

This is all true but I think this explanation will be quite intimidating 
to some users :) I wonder if we can alleviate this somehow.
point. I implemented InferenceUtil, summing up the arguments as code :-)

Documented here:

JUnit test (very simplified)

I also added it to FileInspector, which now works slightly better
(as to fix ticket

you may want to use that now, as shown in the FileExplorer or in the wikipage.

We may also add the InferenceUtil to the CrawlerHandlerBase, for convenience.

with that ticket closed, we are only three "priority 9" tickets away from release... nearly there...


One thing is to demand that we only use inferencing RDF2Go models in 
Aperture, but (1) I don't know whether the major RDF2Go drivers all 
support inferencing, (2) whether requesting an inferencing Model(Set) 
from the ModelFactory is already standardized in RDF2Go, (3) what the 
performance impact will be and (4) this is in the end largely under the 
control of the CrawlerHandler/RDFContainerFactory implementors.

Another idea would be to offer a utility class that extends the contents 
of an RDFContainer with the complete entailment of those statements so 
that, when it contains an NMO.messageSubject property, it afterwards 
also contains an NIE.plainTextContent property with the same subject and 
object. As long as we are only dealing with property hierarchies and 
nothing more advanced, such an inferencer is not hard to make. You 
basically already provided the outline for that.



This email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>
Aperture-devel mailing list

DI Leo Sauermann 

Deutsches Forschungszentrum fuer 
Kuenstliche Intelligenz DFKI GmbH
Trippstadter Strasse 122
P.O. Box 2080           Fon:   +49 631 20575-116
D-67663 Kaiserslautern  Fax:   +49 631 20575-102
Germany                 Mail:

Prof.Dr.Dr.h.c.mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats:
Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313