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
Owlready2 doesn't distinguish between iri (the IRI of the ontology) and base_iri (the prefix of all entities in the ontology). When Owlready2 loads an ontology, it assigns base_iri to the ontology IRI, which creates a lot of confusion. That said, Owlready2 does this for good reasons, since it is only iri that is explicitly defined in the triples (as long as the source only contain one ontology), while base_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 the base_iri from the class IRIs. If the IRIs of all classes starts with the same base, that is the base_iri.
The text was updated successfully, but these errors were encountered:
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: