You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the superclasses attribute returns the classes in random (alphabetical?) order, but should be in proper hierarchical order as it will convey more added value in applications.
e.g., superclasses of a citizen is now:
frozenset({<OntologyClass: City [https://www.simphony-osp.eu/city#City>,](https://www.simphony-osp.eu/city#City%3E,)
<OntologyClass: Geographical Place [https://www.simphony-osp.eu/city#GeographicalPlace>,](https://www.simphony-osp.eu/city#GeographicalPlace%3E,)
<OntologyClass: Populated Place [https://www.simphony-osp.eu/city#PopulatedPlace>,](https://www.simphony-osp.eu/city#PopulatedPlace%3E,)
<OntologyClass: [http://www.w3.org/2002/07/owl#Thing>})](http://www.w3.org/2002/07/owl#Thing%3E}))
probably we need to add a way to traverse iteratively from one level to the other, as in the original pretty_print function.
just to add:
- Ontology individual:
identifier: e4afaa4e-4600-4236-9627-61dd1275eb0b
type: City (city)
superclasses: City (city), Geographical Place (city), Populated Place (city), None (owl)
values: coordinates: [0 0]
pretty print also gets it wrong, it should be as below:
This seems due to the use of frozenset which does not attempt to preserve the order (and in fact seems to order the elements alphanumerically...). Will try to use instead list(dict.fromkeys([...]))!.
as in:
for i in (list(dict.fromkeys([1, 3, 2, 2, 3, 4, 4, 5, 5]))):
print(i)
1
3
2
4
5
The text was updated successfully, but these errors were encountered:
simphony/simphony-osp#853
the
superclasses
attribute returns the classes in random (alphabetical?) order, but should be in proper hierarchical order as it will convey more added value in applications.e.g., superclasses of a citizen is now:
probably we need to add a way to traverse iteratively from one level to the other, as in the original pretty_print function.
just to add:
pretty print also gets it wrong, it should be as below:
This seems due to the use of
frozenset
which does not attempt to preserve the order (and in fact seems to order the elements alphanumerically...). Will try to use insteadlist(dict.fromkeys([...]))
!.as in:
The text was updated successfully, but these errors were encountered: