Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ontology import: classes of imported ontologies do not appear in target ontology class list #22

Open
markdoerr opened this issue Mar 21, 2022 · 5 comments

Comments

@markdoerr
Copy link

When importing an additional

onto = get_ontology("my_ontology.owl").load()
list(onto.classes())
... classes of onto are listed
# check imported ontologies - should be empty
onto.imported_ontologies
>> []  

another_onto = get_ontology("my_other_ontology.owl").load()
list(onto.classes())
... classes of another_onto are listed

onto.imported_ontologies.append(another_onto)
# checking ontology import
onto.imported_ontologies
>>[get_ontology("my_other_ontology")]

list(onto.classes())
... still only classes of onto appear, but not of another_onto

Intuitive behavior would be: here all classes should appear.

@code-gamer
Copy link

I have the same question with you. And I have no idea how to solve it

@anna-kay
Copy link

anna-kay commented Apr 18, 2024

I think the issue with the above may be that onto and another_onto have different namespaces, and because of the different namespaces they classes cannot be placed into the same ontology. I.e. if list(onto.classes()) is [namespace_1.class_1, namespace_1.class_2, etc], it makes sence that namespace_2.class_1, namespace_2.class_2 are not placed in the same list.

But then what is the supposed function of onto.imported_ontologies.append(another_onto)?

@dreinon
Copy link

dreinon commented Dec 10, 2024

Hi, any news on this?

@markdoerr
Copy link
Author

Hi @dreinon and @anna-kay,
I think, to get a final answer, we need to directly address the question to Jean-Baptiste Lamy ("papa of owlready")

@pwin
Copy link
Owner

pwin commented Dec 12, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants