Associating a Python module to an OWL ontology Meaning

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

Associating a Python module to an OWL ontology Meaning

Avraheem
Hello All,

Could you please clarify the purpose behind "Associating a Python module to an OWL ontology"? If we can build ontology in Python with owlready2, why we need a Python Module to an OWL ontology? I could not understand clearly the explanation in the documentation.

Reply | Threaded
Open this post in threaded view
|

Re: Associating a Python module to an OWL ontology Meaning

Jiba
Administrator
Hi,

Associating a Python module to an OWL ontology is useful if you want to add Python methods to your OWL classes. These methods can do anything that can be done in Python. Typically, they are useful if you want to have procedural properties. For example, let us consider the length of an DNA sequence. It can be stored along with the sequence, as an integer data property. However, it is better to computer the length from the sequence, by counting the number of characters.

Of course, you can create an ontology in Python without associating it to a Python module.

Jiba