Relation manipulation in Owlready

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

Relation manipulation in Owlready

Micheal
How do I create a relation between two classes but limiting the output once this relation is called.

e.g.
If classA has instances [A1, A2, A3] and class B has [B1, B2, B3],
I want to create relation R that maps class A's instances to classB's instances, however
exclude B1.

Is there a way in specifying this when creating the relation class?

Or, Is there any other way to add this kind of logic in Owlready please?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Relation manipulation in Owlready

Jiba
Administrator
Hi,

I think you can define the range of the relation as "B and not {B1}" in Protege, or "B & Not(OneOf([B1]))" using Owlready.

Jiba