can't mix python and owl

classic Classic list List threaded Threaded
2 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