protege
protege copied to clipboard
Entity rendering breaks entity linking
Protege 5.5.0
It seems that when Entity rendering results in the same visual label, it also breaks the underlying linking between entities.
Test document:
@prefix gp: <http://project#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
gp:Project a rdfs:Class .
gp:Branch a rdfs:Class .
gp:branch a rdf:Property ;
rdfs:domain gp:Project ;
rdfs:range gp:Branch .
gp:info a rdf:Property .
<http://moo/alpha> a gp:Project ;
gp:branch <http://moo/alpha/develop> .
<http://moo/alpha/develop> a gp:Branch ;
gp:info 'branch of alpha'.
<http://moo/beta> a gp:Project ;
gp:branch <http://moo/beta/develop> .
<http://moo/beta/develop> a gp:Branch ;
gp:info 'branch of beta'.
Import it to Protege and configure Entity rendering
to either Render by entity IRI short name
or Render by annotation property
.
As there is no rdfs:label, it instead renders the last path segment of the IRI (which seems like a good default). This means that both the alpha/develop
and beta/develop
branches are rendered as develop
(note that the issue below is the same even if I define for both branches rdfs:label 'develop'
.
In the image above I click on the alpha Project and then on the develop branch, this correctly results in navigating to the branch of alpha.
However if I then select the beta Project instead, and click on the develop Branch again, it will incorrectly lead me to the same branch of alpha
page as above. Depending on the imported file I've seen it either pick the first or the last in the list of matching final segments.
If I switch to Entity rendering to Render by prefixed name
, the links are working correctly.
As the underlying model doesn't change, I would expect the linking to work irrespective of configured visual rendering, otherwise it makes navigating between entities actually unusable in such cases.
What may be also a related issue, although in this case probably only visual, is that rendering for Render by prefixed name
is inconsistent between the Individuals
and Property assertions
views:
Note also the gp:Project
and gp:Branch
in the image above. If I restart Protege with Render by prefixed name
, it will then also render the property reference differently.
(Restarting of Protege for the doesn't affect the linking bug for the other rendering options -- it is always broken.)
Similarly (but not necessarily the same issue as described by @peteruhnak), in DL-query tab, if a multi-label string is rendered, it can happen that (1) a term is not clickable at all or (2) the substrings of a term get clickable, but not the whole term. For example (this is from the PATO ontology):
Reproduce:
- Open https://raw.githubusercontent.com/pato-ontology/pato/master/pato.owl
- Go to DL query tab, Query for
continuant
; show subclasses. - Scroll to
duration of temperature
; hover overduration
.
Hovering over duration of temperature
highlights duration
and a click links to the duration
term instead of the duration of temperature term
.
Another possible similar problem: If you click on a rendered link of an entity, like quality
and there are multiple terms labelled quality
, protege often links to the wrong one. Reproducible example:
- Open https://raw.githubusercontent.com/pato-ontology/pato/master/pato.owl
- Navigate to PATO:0000001
- Open Usage Tab
- Click on
quality
as it is used in the logical definition ofdecreased quality
- The click will, if everything is the same as what I am seeing, to BFO:0000019 (also labelled
quality
).
Addressing this (or these, if they're not the same problem) will help avoid choosing the "wrong" one of two entities with identical labels. That would, in turn, ensure that expected inferences happen, and thereby make my working life easier. Please do it!
Great idea, Nico, I'd love to see these changes too. :)
I just want to bump this. We have several terms in our ontolog where both of the mentioned errors occur.
As an example, we have two individuals with the labels "A - Procurement" and "Procurement" respectively. Protege splits up the first name so that only the "Procurment" part is clickable, which takes us to the "Procurement" individual, and not the "A - Procurement" individual.
The code should be rewritten so that its the URI of the term that decides what the click action should resove to, not the chosen rendering of the term.
This is a breaking error for us, and we might have to stop using Protege if it is not resolved.
Referring to one of the issues described in @matentzn 's comment above,
Hovering over duration of temperature highlights duration and a click links to the duration term instead of the duration of temperature term.
I also frequently see that happen in other parts of the Protege GUI - for me, it's most common to encounter it in the Usage tab for classes. Maybe should be filed as a separate issue? Definitely adds friction to my workflows, since I can't just click to get to the referenced entity (I usually end up finding it via Search).
EDIT: Oops, just realized that the sample image @matentzn posted is actually from the Usage tab. Still - should this be broken into its own issue? Labels with spaces in them are quite common in OBO-land, so this comes up all the time, even when labels are unique in an ontology.