Use SWRL-API and OWL-API to transfer the inferred rule engine knowledge to OWL knowledge.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Use SWRL-API and OWL-API to transfer the inferred rule engine knowledge to OWL knowledge.

mary
In the protege tool, SWRL Tab has three buttons , 'OWL+SWRL->Drools' button,'Run Drools' button and 'Drools->OWL' button. I can use them  to run rule engine and transfer inferred rule engine knowledge to OWL knowledge.

In java code, I also want to realize these function.
SWRLRuleEngine swrlRuleEngine = SWRLAPIFactory.createSWRLRuleEngine(ontology);
 // Process the SQWRL result  , maybe the same as 'OWL+SWRL->Drools' button?
SWRLRule rule1 = swrlRuleEngine.createSWRLRule("s3",
                                         "Process(?s)^hasPath(?s,?p) -> hasExecutableFile(?s,?p)");
swrlRuleEngine.infer();//run engine, maybe the same as 'Run Drools' button ?

But how to realize  the function of 'Drools->OWL' button with SWRLAPI?
Please help me. Thanks advance.
Reply | Threaded
Open this post in threaded view
|

Re: Use SWRL-API and OWL-API to transfer the inferred rule engine knowledge to OWL knowledge.

Lorenz Buehmann
Trying your code is not possible for you?

Or looking into the source code of the plugin? It's open source...


On 24.05.2017 14:28, mary wrote:

> In the protege tool, SWRL Tab has three buttons , 'OWL+SWRL->Drools'
> button,'Run Drools' button and 'Drools->OWL' button. I can use them  to run
> rule engine and transfer inferred rule engine knowledge to OWL knowledge.
>
> In java code, I also want to realize these function.
> SWRLRuleEngine swrlRuleEngine =
> SWRLAPIFactory.createSWRLRuleEngine(ontology);
>  // Process the SQWRL result  ,* maybe the same as 'OWL+SWRL->Drools'
> button?*
> SWRLRule rule1 = swrlRuleEngine.createSWRLRule("s3",
> "Process(?s)^hasPath(?s,?p) -> hasExecutableFile(?s,?p)");
> swrlRuleEngine.infer();//run engine, *maybe the same as 'Run Drools' button
> ?*
>
> But how to *realize  the function of 'Drools->OWL' button with SWRLAPI?*
> Please help me. Thanks advance.
>
>
>
>
> --
> View this message in context: http://protege-project.136.n4.nabble.com/Use-SWRL-API-and-OWL-API-to-transfer-the-inferred-rule-engine-knowledge-to-OWL-knowledge-tp4668590.html
> Sent from the Protege Developer mailing list archive at Nabble.com.
> _______________________________________________
> protege-dev mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/protege-dev

_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev
Reply | Threaded
Open this post in threaded view
|

Re: Use SWRL-API and OWL-API to transfer the inferred rule engine knowledge to OWL knowledge.

Martin O'Connor-2
In reply to this post by mary

See here:


and here:


Martin

On May 24, 2017, at 5:28 AM, mary <[hidden email]> wrote:

In the protege tool, SWRL Tab has three buttons , 'OWL+SWRL->Drools'
button,'Run Drools' button and 'Drools->OWL' button. I can use them  to run
rule engine and transfer inferred rule engine knowledge to OWL knowledge.

In java code, I also want to realize these function.
SWRLRuleEngine swrlRuleEngine =
SWRLAPIFactory.createSWRLRuleEngine(ontology);
// Process the SQWRL result  ,* maybe the same as 'OWL+SWRL->Drools'
button?*
SWRLRule rule1 = swrlRuleEngine.createSWRLRule("s3",
"Process(?s)^hasPath(?s,?p) -> hasExecutableFile(?s,?p)");
swrlRuleEngine.infer();//run engine, *maybe the same as 'Run Drools' button
?*

But how to *realize  the function of 'Drools->OWL' button with SWRLAPI?*
Please help me. Thanks advance.




--
View this message in context: http://protege-project.136.n4.nabble.com/Use-SWRL-API-and-OWL-API-to-transfer-the-inferred-rule-engine-knowledge-to-OWL-knowledge-tp4668590.html
Sent from the Protege Developer mailing list archive at Nabble.com.
_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev


_______________________________________________
protege-dev mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/protege-dev