|
This post was updated on .
I'm not sure if it's something wrong with the compatibility with Jupyter Notebook or I'm using Owlready the wrong way, but when I tried to execute the following code (Fruit is the only class I created in the ontology, and Apple is Fruit's only subclass):
Fruit.descendants()
Apple.ancestors()
in the same code cell, all I got is
{onto_empty.Apple, onto_empty.Fruit, owl.Thing}
The problem is the result of Fruit.descendants() disappeared for no reason, though running Fruit.descendants() alone works fine, it returns
{onto_empty.Apple, onto_empty.Fruit}
|