Thanks Andy. I tried creating a model using the TDBFactory from the parsed triples that were present in TDB and initialized the InferenceSetupRDFS with the same. Although I am getting OutOfMemory due to memory constraints and larger model (~ 14GB) on my machine but I am able to follow. I will give it a try with a smaller model to understand the inference further.
Thanks, Anuj On Wed, Mar 30, 2011 at 12:09 AM, Andy Seaborne < [email protected]> wrote: > > > On 29/03/11 19:34, Anuj Kumar wrote: > >> Thanks Andy. That was helpful and makes sense to do it once and store it >> for >> future references. On the same lines, I was looking into >> InferenceExpanderRDFS class. I am using Jena 2.6.4, but I couldn't locate >> this class. >> >> Is that the right one? >> > > See > org.openjena.riot.pipeline.inf.InferenceSetupRDFS > in ARQ > > > >> - Anuj >> >> On Tue, Mar 29, 2011 at 7:29 PM, Andy Seaborne< >> [email protected]> wrote: >> >> >>> >>> On 27/03/11 16:37, Anuj Kumar wrote: >>> >>> Thanks Bob. Will take a look at it. >>>> >>>> - Anuj >>>> >>>> On Sun, Mar 27, 2011 at 7:14 PM, Bob DuCharme<[email protected]> wrote: >>>> >>>> is it better to go with SPARQL queries or Jena Inference mechanism? >>>> >>>>> >>>>>> >>>>> You might want to look into SPIN, which provides a way to implement >>>>> rules >>>>> using SPARQL CONSTRUCT and ASK queries: http://www.spinrdf.org/ >>>>> >>>>> Bob >>>>> >>>>> >>>>> On 3/26/2011 1:18 PM, Anuj Kumar wrote: >>>>> >>>>> Hello Everyone, >>>>> >>>>>> >>>>>> I am trying some basic inferencing with Jena 2 Inference support and >>>>>> following the tutorial given here: >>>>>> http://jena.sourceforge.net/inference/ >>>>>> >>>>>> There are some basic inferencing regarding the property of a resource >>>>>> and >>>>>> its sub property in my TDB instance. I have loaded a set of triples >>>>>> into >>>>>> TDB >>>>>> and I am creating a model from the TDBFactory using the TDB database >>>>>> location. The basic inferencing is taking longer time as compared to >>>>>> SPARQL >>>>>> queries. I have limited RAM of 2GB and just trying to compare the two >>>>>> approaches. >>>>>> >>>>>> >>>>> Inferencing does take memory and time but it can be done once and the >>> results stored, so query is done without recalculating. >>> >>> >>> >>> What exactly is a better approach to do such inferencing? Also if you >>>>>> have >>>>>> your own custom rules, is it better to go with SPARQL queries or Jena >>>>>> Inference mechanism? >>>>>> >>>>>> >>>>> If you just have some RDFS, then riot.infer will, in a streaming >>> fashion, >>> expand the data once and for all. You can feed the output into the bulk >>> loader. >>> >>> Andy >>> >>> >>
