5 Replies Latest reply on Jul 6, 2010 1:43 PM by alwu-Oracle

    how to seperate owl inference and user

      1. Is there a way to seperate inference with "owlprime" and user_defined rulebase?

      for example: Inference(M1+user_defined rules) against the results from(M1+"owlprime")

      2. Can I transfer entailment into model or combine the entailed results with the original model?

      Cause we need to change rules in the user_defined rulebase frequently, and we do not wanna do owlprime inference everytime.


        • 1. Re: how to seperate owl inference and user

          There is a way. Basically, you can finish OWLPrime inference first. Then you read out all triples (asserted and inferred) and store them into a new model. This new model can serve as a basis for your user-defined rules inference. This step can be done using Jena Adapter.

          An assumption has to be made here though. I guess we are assuming that the user-defined rules inference will not trigger new inference for OWLPrime.


          Zhe Wu
          • 2. Re: how to seperate owl inference and user
            yes, actually, I have tried this way:

            I created a new model first:

            ModelOracleSem dbModelnew = ModelOracleSem.createOracleSemModel( oracle, "newmodel" );

            Then I add all the triples and entailments into it:

            GraphOracleSem g = dbModelnew.getGraph();
            GraphUtil.findAll(dbModel.getGraph()), "SYSAUX");

            But it is a little bit slow, is there any other faster way?


            • 3. Re: how to seperate owl inference and user

              What is the performance on that one? Are you using the same Oracle connection to do both read and write? If that is the case, you may
              want to establish a new Oracle instance and use that for write (dbModelnew). Make sure there is no triple in dbModelnew.

              An alternative is to serialize dbModel into an NTRIPLE file. e.g.
              OutputStream os = new FileOutputStream("./my.nt");
              dbModel.write(os, "N-TRIPLE");

              Once the serialization is done, you can use the usual bulk loading for a file with the addInBulk API.
              With this approach, you only need one db connection (Oracle object).


              Zhe Wu
              • 4. Re: how to seperate owl inference and user

                The new model size is 115300. It takes about 23 seconds to finish the storage.

                Thank you for your advice. I have tried the both alternatives, the performance is almost the same.

                Oracle supports incremental inference which is very nice. But it does not support incremental inference with user-defined rule.

                Is there any way that we could re-use the results after (owlprime+user_defined) inference?

                Thanks a lot

                • 5. Re: how to seperate owl inference and user

                  Your loading speed is around 18M per hour. What kind of I/O do you have? Do you have multiple disks (or SSDs, or SAN)?

                  If there is no addition to the ontology (TBox or ABox), then existing inferred results will be re-used. If there
                  is a deletion, then existing inferred results are removed first.

                  What kind of user defined rules do you have?


                  Zhe Wu