How to write a SWRL rule using more than one namespace/two or more ontologies.

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

How to write a SWRL rule using more than one namespace/two or more ontologies.

Siddhesh
Hello Jiba,

I have two ontologies and there are property relation betwwen these two ontologies.
i have loaded these ontologies with namespaces as onto1 and onto2 in owlready2.
now I want to write a rule using these both ontology.that I want to use onto1 namespace for first ontology and onto2 for second ontology in a SWRl rule.

Could you help me how this can be done.

Thanks
Siddhesh
Reply | Threaded
Open this post in threaded view
|

Re: How to write a SWRL rule using more than one namespace/two or more ontologies.

Jiba
Administrator
Hi,

You can use the namespaces optional argument of the set_as_rule() method. This argument is a list of the namespaces, e.g. in your example [onto1, onto2].

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: How to write a SWRL rule using more than one namespace/two or more ontologies.

Siddhesh
Hello Jiba,

Thank you for your Valuable reply.
It is working as expected.I seen rule.py and I was trying to do same changes and I got your reply just before it.

Thanks,
Siddhesh