Problem with “equivalent_to” for writing general class axioms in owlready2

50 views Asked by At

When I want to write a general class axiom in owlready2 where the left side is subclass of the right side, I use “is_a” and there is no problem. For example:

gca=GeneralClassAxiom(Man & has_couple.some(Woman))
gca.is_a.append(Man & has_wife.some(Woman))

But when I write an axiom in which the left side is equivalent to the right side I encounter an error:

gca=GeneralClassAxiom(Man & has_couple.some(Woman))
gca.equivalent_to.append(Man & has_wife.some(Woman))

the error is:

AttributeError: 'GeneralClassAxiom' object has no attribute 'equivalent_to'

It is surprising. Because defining classes is possible by both “equivalent_to” and “is_a”.

Although a solution to this problem is to divide the “equivalent to” axiom into two “ subclass of” axioms in which the right hand side of anyone is the left hand side of another and vice versa. But it is expected for an ontology editor to define a way to write the general class axioms containing “equivalent to” in one axiom not in two ones. Does anyone know this way?

I don't have any idea to solve the problem

0

There are 0 answers