simphony-osp
simphony-osp copied to clipboard
Multi-instantiation
In GitLab by @urbanmatthias on Nov 12, 2019, 11:50
Should we allow multi-instantiation? I.e. a cuds object is an instance of multiple classes.
In other words: A cuds object is in the intersection of the set of individuals that are represented by the classes.
For example:
- cuds_object.is_a.append(NAMESPACE.CLASS(**kwargs))
I think it depends on the ontology, if this is helpful.
In GitLab by @yoavnash on Nov 21, 2019, 10:50
Notes:
- Easy to implement with OSP core v3.2.
- Reasoners might deduce that an object is an instance of multiple classes, therefore we should support this.
@ahashibon what do you think?
Example:
Assume the following statements are in the ontology:
An Adult
is a Person
that is older than 18 years.
A Father
is a Person
that is male
and has a child.
--> It is possible to be an adult and a father simultaneously.
Currently, the Cuds.oclass
property only returns one ontology class. In this case it should be possible to return multiple.
This is especially important now that we support a reasoner. It is expected that the reasoner will produce multiple RDF.type statements per individual.
API-wise I would suggest to deprecate the Cuds.oclass
property and replace it with Cuds.oclasses
.
What do you think?
For me it looks fine. Do you know if Owlready also supports multi-instantiation?
owlready supports it of course. They have a is_a
property that is a list.
At the moment it is possible to have multiple oclasses for one CUDS objects, e,g, when the user infers it.
See Cuds.oclasses
. Unfortunatly still much of the cuds assumes there is only one oclass.
Also there is no proper way to add oclasses etc.