Owlready
Search
everywhere
only in this topic
Advanced Search
How to get synonyms and other properties?
Classic
List
Threaded
♦
♦
Locked
2 messages
S04dEGR4gE
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
How to get synonyms and other properties?
I got the following error when I use get_properites(). What is the correct way to get the synonyms?
>>> from owlready2 import *
>>> onto = get_ontology('/tmp/EFO.owl')
>>> onto.load()
>>> onto.search_one(label='HEK-293 cell').get_properties()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: get_properties() missing 1 required positional argument: 'self'
Jiba
Reply
|
Threaded
Open this post in threaded view
♦
♦
|
Re: How to get synonyms and other properties?
Administrator
get_properties() is for individuals. To get the value of a property or an annotations, just use onto.search_one(label='HEK-293 cell').<your_property_name>, for example onto.search_one(label='HEK-293 cell').synonym
Best regards,
Jiba
Free forum by Nabble
Edit this page