Re: How to access ontology annotations

Posted by Jiba on
URL: http://owlready.306.s1.nabble.com/How-to-access-ontology-annotations-tp2527p2554.html

Hi,

Currently, it is not possible to obtain the list of annotations... I've added that support in the development version of Owlready. In that version, you can now use onto.metadata as you did to obtain a list of annotation property, e.g.:

for annot in onto.metadata:
    print(annot[onto])


As a workaround, in the current stable version, you can use instead:

for annot in [onto._to_python(p) for p in onto.world._get_triples_s_p(onto.storid) if p != rdf_type]:


Jiba