Hello, i wanted to ask how could i get the ancestors/superclasses of a given class, for example
from Margherita i want to get: NamedPizza, Pizza, Food, Thing.
I have already tryed something like this:
>>>onto = get_ontology("
https://protege.stanford.edu/ontologies/pizza/pizza.owl").load()
>>>onto.Pizza
>>>namespace = onto.get_namespace("
http://www.co-ode.org/ontologies/pizza/pizza.owl#")
>>>print(list(namespace.Margherita.ancestors()))
but i don't necessarily know the starting class. The class is going to be given to me by the user through a string input. (in the example Margherita would be given to me by the user).