-
Notifications
You must be signed in to change notification settings - Fork 9
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
Correctly load base_iri
and iri
#723
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Owlready2 doesn't distinguish between
iri
(the IRI of the ontology) andbase_iri
(the prefix of all entities in the ontology). When Owlready2 loads an ontology, it assignsbase_iri
to the ontology IRI, which creates a lot of confusion. That said, Owlready2 does this for good reasons, since it is onlyiri
that is explicitly defined in the triples (as long as the source only contain one ontology), whilebase_iri
has to be inferred from the IRIs of the entities in the ontology.However, we can do better. When loading a turtle file, the
base_iri
can be obtained from the@prefix : <...> .
line. When loading other formats, we can try to infer thebase_iri
from the class IRIs. If the IRIs of all classes starts with the same base, that is thebase_iri
.The text was updated successfully, but these errors were encountered: