From: Krishnamurthy, V. <Ven...@gs...> - 2005-12-07 18:41:37
|
I actually dealt with a similar case last year...One of the ways I explored (didnt do it finally) was to construct map models on the fly - since I used Jena's general rules parser (which I think the owl inferencer uses anyway) - I thought of parsing out rules to see what resources/properties they wanted, and then filter the overall map model by selecting only those resources required to answer the rule and further restricting this set using d2rq:conditions...Didnt get a chance to fully test it...Actually I think I asked for the D2RQModel(Model someModel) constructor specifically for this purpose But it illustrates that this is a Jena question - because the rule engine ultimately has to query an underlying model somehow - a D2RQ model is just one special kind of underlying model. The trick I think is to optimize the 'path' that Jena takes to get the data related to the rule...As Walker points out, it seems to get ALL data and then runs through it (not sure) - maybe someone could build a general-purpose bridge that creates an 'optimal' query when the rule engine is used? Any thoughts? Venkat ------ Venkat Krishnamurthy, FRM | Management Controls Department | Goldman, Sachs & Co.| 212-855-6074| ven...@gs... This message may contain information that is confidential or privileged. If you are not the intended recipient, please advise the sender immediately and delete this message. See http://www.gs.com/disclaimer/email <http://www.gs.com/disclaimer/email> for further information on confidentiality and the risks inherent in electronic communication _____ From: d2r...@li... [mailto:d2r...@li...] On Behalf Of Walker She Sent: Wednesday, December 07, 2005 2:54 AM To: d2r...@li... Subject: Re: [d2rq-dev] is it possible that we can keep D2RQ's dynamic feature when doing OWL inference when Hi Richard, thanks for your replying. well, it really does work except that there's an error. This error, however, dosen't mean much thing. The Owl inference can still go on and sometimes with unexpected answers. I don't know whether it's the matter of Jena or D2RQ. You mean if i want to do owl inference on D2RQ Model, the performance will be almost the same whether or not i preload the virtual statements into database to obtain persistence Jena Model? To inference on subset of the full data seems really good, but you know, it's hard to obtain the exact subset data from the Model. -Walker Richard Cyganiak <ri...@cy...> wrote: Hi Walker, The short answer: Doing inference over a D2RQ model should be possible, but it's going to be very, very slow. I've not tried this, but in theory, it *should* work: Model baseModel = new ModelD2RQ(...); OntModel withReasoning = ModelFactory.createOntologyModel (OntModelSpec.PICK_YOUR_REASONER, baseModel); This creates an ontology model with reasoner on top of the D2RQ model. The ontology model should query the D2RQ model (which then queries the database) when inference is performed. It's the same basic approach as using Jena reasoners with persistent Jena models, see [1]. However, this will result in *lots* of queries against the database, and it's likely to be very slow. I don't know an easy way around this. Maybe run the inference only on one or more smaller subsets of the data. Richard [1] http://jena.sourceforge.net/ontology/#persistence On 6 Dec 2005, at 10:20, Walker She wrote: _____ Yahoo! Personals Let fate take it's course directly to your email. See who's waiting for you Yahoo! <http://us.rd.yahoo.com/evt=36106/*http://personals.yahoo.com> Personals |