Implementation of General Class Axioms or left-handside logic?

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

Implementation of General Class Axioms or left-handside logic?

H_Borgelt
Dear Jean Baptiste,

I am curretly working on an ontology which is using "General Class Axioms" or left-handside logic, and i could not find out whether owlready2 currently supports such expressions. Therefore i would be greatful if you can tell me, whether owlready2 supports this logic. If owlready2 supports this logic, can you give me a small example or a link to such an example? If not, do you know of an alternativ/workaround to left-handside logic in owlready2?

An example of left-handside logic, and its application in protege, can be found in this link: https://ontogenesis.knowledgeblog.org/1288/

Best regards and gratefull for any help you can provide
Hendrik Borgelt
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of General Class Axioms or left-handside logic?

Jiba
Administrator
Hello,

Owlready2 did not support general class axiom, but I've just added some basic support in the development version on BitBucket.


You can list general class axioms with Ontology.general_class_axioms:

gcas = list(onto.general_class_axioms())

The .left_side and .is_a attribute can be used to analyse the content.


You can also created general class axioms as follows:
    with onto:
      gca = GeneralClassAxiom(onto.Disorder & onto.has_location.some(onto.Heart)) # Left side
      gca.is_a.append(onto.CardiacDisorder) # Right side

Jiba
Reply | Threaded
Open this post in threaded view
|

Re: Implementation of General Class Axioms or left-handside logic?

H_Borgelt
Many thanks for the quick help, especially for the quick realisation in the code.
I haven't had time to test the code yet, but hopefully I'll be able to come back and tell you that it was a full success. The code will be very useful for me.

Best regards,
Hendrik Borgelt