jena-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benson Margulies <>
Subject Re: Reasoners, Datasets, Models
Date Sat, 11 Dec 2010 01:02:12 GMT
On Fri, Dec 10, 2010 at 7:26 PM, Ian Dickinson <> wrote:
> On 10/12/10 23:14, Benson Margulies wrote:
>> I want to make an InfModel that puts an inference engine on top of a
>> TDB dataset so that inference happens over the set. If this isn't a
>> nutty idea altogether,
> Not nutty, but performance may not be great since the inference engine makes
> many queries into the model, and going to disk is slow ...

Another possibility. My main interest in inference is some sameAs
tuples that get added to the pile to represent coreference. Might I be
better off running a query that returns an initial collection of
individuals, and then running my own query to follow the sameAs (or
any other) links that I care about?

>> is there any way to do this without using the
>> assembler?
> Yes.
> Model baseModel = ... yourTDBModel ...;
> OntModel infModel = ModelFactory.createOntologyModel(
>        OntModelSpec.OWL_MEM_MICRO_RULE_INF,    // deductions in memory
>        baseModel                               // axioms in TDB

Note that 'baseModel' is a MODEL, not a Dataset. I want to query over
all the graphs (as I can by passing a TDB dataset rather than a model
into the query universe.) Even if I set TDB.symUnionDefaultGraph,
passing the default model from the TDB doesn't work.

I tried the above using the TDB's default graph, got no results. I
even tried to crib the code that implements that:

        Reasoner reasoner = ReasonerRegistry.getOWLReasoner();
        DatasetGraphTDB ds = dsGraph.duplicate();
        ds.setEffectiveDefaultGraph(new GraphNamedTDB(ds, Quad.unionGraph));
        InfGraph graph =
        InfModel infModel = new InfModelImpl(graph);

What's frustrating is that even very simple queries return no result.
I haven't even got as far as trying any actual inference.

> );
> Ian
> --
> ____________________________________________________________
> Ian Dickinson                   Epimorphics Ltd, Bristol, UK
> cell: +44-7786-850536              landline: +44-1275-399069
> ------------------------------------------------------------
> Epimorphics Ltd.  is a limited company registered in England
> (no. 7016688). Registered address: Court Lodge, 105 High St,
>              Portishead, Bristol BS20 6PT, UK

View raw message