On Fri, 2010-12-31 at 08:57 -0500, Benson Margulies wrote: 
> Step 1:
> 
>  Model schema = ModelFactory.createDefaultModel();
>         schema.read(RdfUtils.getJugOntology(),
> RdfUtils.getJugOntologyUri(), "RDF/XML");
>         return ModelFactory.createRDFSModel(schema, data);

What's in the data? 

> Step 2: about 50k tuples, many of them owl:sameAs

What is 50k tuples, the data, the schema, both, something else?

> Step 3:
> 
> NodeIterator sameAsItems = model.listObjectsOfProperty(root,
> relatingProp); // prop is in fact owl:sameAs
>             while (sameAsItems.hasNext()) {
>             ...
>             }
> 
> Runs for a very long time, using a very large amount of memory.
> Eventually runs out of memory.

Strange.  The owl:sameAs reasoning can be hugely expensive (it is
fundamentally exponential) but the RDFS reasoner knows nothing about
owl:sameAs so isn't doing any of that reasoning.

I suspect a different problem rather than inference.

> I am at this point about to remove all dependencies on inference and
> use a plain model. Is there something I should learn from this about
> what inference is and isn't useful for?

Not from this example.

Dave


Reply via email to