can't mix python and owl

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

can't mix python and owl

ZhangYu
Dear Mr Jean-Baptiste Lamy,

I try to implement example#1:reasoning in your paper,<Ontology-oriented programming in Python with automatic classification and high level constructs for biomedical ontologies>.

I got the following error:
             AttributeError: 'take' property is not defined.
I don't know how to implement this sentence in your paper,"Annotation triple :(drug.owl,python_module,drug.py)"

can you give me some help?

Thanks in advance for your attention!

Best Regards,
GB
Reply | Threaded
Open this post in threaded view
|

Re: can't mix python and owl

Jiba
Administrator
Hello,

You need the annotation. It indicates to Owlready that the Python module should be loaded with the ontology.

To add the annotation, you need to:

 1) import the Owlready ontology (URI http://www.lesfleursdunormal.fr/static/_downloads/owlready_ontology.owl )

 2) Add the annotation


Both steps can be performed in Protege, in the "Active ontology" tab. See example in the doc here:

        http://owlready2.readthedocs.io/en/latest/mixing_python_owl.html

Best regards,
Jean-Baptiste Lamy
MCF, LIMICS, Université Paris 13

> Dear Mr Jean-Baptiste Lamy,
>
> I try to implement example#1:reasoning in your paper,<Ontology-oriented
> programming in Python with automatic classification and high level
> constructs for biomedical ontologies>.
>
> I got the following error:
>              AttributeError: 'take' property is not defined.
> I don't know how to implement this sentence in your paper,"Annotation triple
> :(drug.owl,python_module,drug.py)"
>
> can you give me some help?
>
> Thanks in advance for your attention!
>
> Best Regards,
> GB
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://owlready.8326.n8.nabble.com/can-t-mix-python-and-owl-tp68.html
> To start a new topic under Owlready, email [hidden email]
> To unsubscribe from Owlready, visit
rdk
Reply | Threaded
Open this post in threaded view
|

Re: can't mix python and owl

rdk
Hi Jean-Baptiste,

I think it would be helpful to provide the URI of 'owlready_ontology.owl' in the documentation, as you did here.
Regarding the methods embedded in classes, when mixing Python with OWL: does it also work for '__ini__()'?

Best regards,

Rui de Klerk
Reply | Threaded
Open this post in threaded view
|

Re: can't mix python and owl

Jiba
Administrator
Hi,

> I think it would be helpful to provide the URI of 'owlready_ontology.owl' in
> the documentation, as you did here.

You are right, I'm adding it in the doc!

> Regarding the methods embedded in classes, when mixing Python with OWL: does
> it also work for '__ini__()'?

Yes, it also work for __init__() (however, do not forget to call the super implementation!).

Best regards,
Jean-Baptiste Lamy
MCF, LIMICS, Université Paris 13

> Hi Jean-Baptiste,
>
> I think it would be helpful to provide the URI of 'owlready_ontology.owl' in
> the documentation, as you did here.
> Regarding the methods embedded in classes, when mixing Python with OWL: does
> it also work for '__ini__()'?
>
> Best regards,
>
> Rui de Klerk
>
>
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://owlready.8326.n8.nabble.com/can-t-mix-python-and-owl-tp68p188.html
> To start a new topic under Owlready, email [hidden email]
> To unsubscribe from Owlready, visit