Property assertion saved as annotations

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

Property assertion saved as annotations

egolep
I don't know if I'm doing something wrong or if I'm not understanding something deeper on ontology development, but the syntax

instance_name = ClassName("Name")
instance_name.property_name = "property value"

does not actually create an instance/individual with the property value assigned, but only an annotation, i.e. when I open the saved ontology with Prot├ęge, I have the Data/Object Property assertions field empty and an annotation with the name of the property and the value I inserted.

Is this a bug? Or am I doing something completely wrong/senseless?

I'm using owlready2 v0.38, but the same behavior where also present in owlready2 v0.37
Reply | Threaded
Open this post in threaded view
|

Re: Property assertion saved as annotations

egolep
I also noted that a new homonymous class (which is going to be a subclass of owl.Thing with no regard for the hierarchy of the "original" class) is generated and that the instance is assigned to this new class.

I'm following the syntax that is also reported in the book, and I have tried both on assigning no property at all, assigning a subset or assigning all the possible property for a given instance of a given class.