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

Issue using .label with rdfs:label, but functions with rdf:label #36

Open
Superraptor opened this issue Feb 24, 2023 · 1 comment
Open

Comments

@Superraptor
Copy link

Hello!

This issue concerns version 0.26 of owlready2, so please feel free to ignore if this is fixed in more recent systems, I just wanted to note (I'm unfortunately currently restricted to using 0.26 and I'll have to build a work-around, but just wasn't finding much online and wanted to create a record for others).

Essentially, I have a singular entity in which I'm trying to call for the label using "entity.label" (and several of its variants). None of these appeared to be returning any "rdfs:label" attributes of any entities, except for those which had been mislabeled as "rdf:label" (without the "s"). Because of this, it appeared that most entities had no label, when this was not the case.

For a second, I thought I had made a mistake and that "rdf:label" was the canonical form. However, this is not true, and "rdfs:label" is indeed correct (re: RDF Schema 1.1 documentation).

I believe the correct way to fix this issue in 0.26 is to do some form of custom rendering, but I haven't quite worked out the particulars. If I do find a solution, I'll come back and post it here.

Thank you so much for your time!

@Superraptor
Copy link
Author

Essentially the only solution I could come up with was to create a temporary file where rdfs:label is replaced by rdf:label, read that in, and then delete the temp file. While this works, it is likely to be computationally expensive on larger ontology files.

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

1 participant