7 Replies Latest reply on Oct 8, 2015 4:11 PM by alwu-Oracle

    Protege plugin - Inferencing & Reasoning

    Akhilesh Bangalore

      Hi,

       

      I have been trying to get acquainted with the Protege plugin. I am able to create the Ontology and also can see the inferences derived from it by running the Reasoner on the plugin.

      But when I save the ontology to Oracle, the results of the sparql queries do not contain the inferences. Can you let me know where am I going wrong? Am I needed to create the rulebase manually?

       

      Thanks,

      Akhilesh

        • 1. Re: Protege plugin - Inferencing & Reasoning
          alwu-Oracle

          Hi Akhilesh,

           

          Which version of the Protege Plugin are you using? Do you see "Save Reasoner Output" under the "Oracle" menu?

           

          Thanks,

           

          Zhe Wu

          • 2. Re: Protege plugin - Inferencing & Reasoning
            Akhilesh Bangalore

            Hi Zhe Wu,

             

            I used the plugin that was available along with the Jena Fuseki adapter download.

            After running the reasoner I did save the inference ( tried replacing the ontology and creating the new one too).

             

            Another thing which I noticed was that all the triples got deleted when I replaced the ontology.

             

            When I save the ontology I have observed that 2 tables were created but not the relevent rulebase. Doesn't the rulebase get created? Without the rulebase and relevent entailment how can the inferencing happen on new triples?

             

            Thanks,

            Akhilesh

            • 3. Re: Protege plugin - Inferencing & Reasoning
              Isaibarajas-Oracle

              Hi Akhilesh,

               

              When an Ontology is replaced it gets deleted and then the new data is written to the model. This way, we don't mix up old assertions with new ones.

               

              On the other hand the "Save Reasoner Output" saves the inferred graph from the selected reasoner within Protégé as a Model in the database, thus we do not  create any extra entailments and rulebases, we only save it to the database as asserted. You can, of course, create entailment on top of it using PL/SQL APIs or corresponding Java APIs that Oracle provides.

               

              Hope this helps,

              Isai Barajas

              • 4. Re: Protege plugin - Inferencing & Reasoning
                Akhilesh Bangalore

                Hi Isai Barajas,

                Isaibarajas-Oracle wrote:

                 

                When an Ontology is replaced it gets deleted and then the new data is written to the model. This way, we don't mix up old assertions with new ones.

                OK. I understand why the triples have to be deleted.

                 

                Isaibarajas-Oracle wrote:


                On the other hand the "Save Reasoner Output" saves the inferred graph from the selected reasoner within Protégé as a Model in the database, thus we do not  create any extra entailments and rulebases, we only save it to the database as asserted. You can, of course, create entailment on top of it using PL/SQL APIs or corresponding Java APIs that Oracle provides.

                 

                Please correct me if am wrong.

                If the inferred facts are stored as triples, doesn't it mean that there is a need to run the reasoner frequently to draw the inferences for newly added triples? Would it not have been better if the appropriate rulebase & entailments were created as part of saving the ontology? Is there a way to do this with the Oracle's plugin for Protege?

                 

                I fail to see how to effectively use it on production database!

                 

                Also, if the inferred facts are stored as triples, it is unclear as to why they are not returned as part of results when a sparql query is executed.

                 

                Below are the sequence of steps I had performed -

                 

                1. Created an ontology in Protege - the ontology included definitions for few classes & object properties with domain & range restrictions along with an inverse object property.
                2. Saved the ontology to DB.
                3. Added a pair of triples to a named graph via the Fuseki adapter's UI screen.
                4. Reopened the ontology and started the reasoner. The inferred facts identified the respective subject's & object's class types and also inferred the inverse property.
                5. Saved the inferred results(to a new model).
                6. Modified Fuseki's configuration to use the new model created in previous step.
                7. Executed a basic sparql query via Fuseki adapter's UI screen.

                 

                The result included only the triples that were added in step 3.

                 

                Kindly let me know if you find anything out of ordinary in the above steps.

                 

                Thanks,

                Akhilesh.

                • 5. Re: Protege plugin - Inferencing & Reasoning
                  Akhilesh Bangalore

                  Hi alwu-Oracle / Isaibarajas-Oracle,

                   

                  Please add your comments.

                   

                  Thanks,

                  Akhilesh

                  • 6. Re: Protege plugin - Inferencing & Reasoning
                    marc980813

                    Hi Akhilesh,

                    If you use named graphs you must add a hint such as

                    PREFIX ORACLE_SEM_FS_NS: <http://oracle.com/semtech#timeout=100,qid=123,strict_default=f>

                     

                    in Joseki or Fuseki

                     

                    strict_default =f means that you do not just want to query the default graph

                     

                    Marc

                    • 7. Re: Protege plugin - Inferencing & Reasoning
                      alwu-Oracle

                      Hi Akhilesh,

                       

                      Your flow looks fine. Can you please cut & paste here a small test case (your ontology) here and we will see if it reproduces locally.

                       

                      Thanks,

                       

                      Zhe Wu