Skip to content
This repository has been archived by the owner on Apr 28, 2023. It is now read-only.

When multiple labels are provided, which one should we use? #570

Open
jamesamcl opened this issue Mar 14, 2022 · 5 comments
Open

When multiple labels are provided, which one should we use? #570

jamesamcl opened this issue Mar 14, 2022 · 5 comments

Comments

@jamesamcl
Copy link
Member

For example:

Screenshot 2022-03-14 at 10 41 12

As RDF triples are unordered, there is nothing to indicate in the OWL RDF/XML file which label of these is the preferred. So OLS would be equally justified in using "术语编辑者" in place of "term editor". Although multilang will disambiguate this somewhat, even then we have both "definition editor" and "term editor" for the en language.

We cannot just use all of the labels because OLS needs to select one to use as a property name in the API. For example, the above property appears as such:

Screenshot 2022-03-14 at 10 44 05

@jamesamcl
Copy link
Member Author

Should the ontologies be doing something to indicate which is the preferred label and which are alternate? @matentzn ?

@matentzn
Copy link
Contributor

We have a glass clear rule in OBO that only one (non-language-tagged) label is allowed for OBO ontologies.. rdfs:label is the "preferred" label the other ones are synonyms. In this case here, I would recommend to sort the labels and pick the first in alphabetical sort order.

@jamesamcl
Copy link
Member Author

This is from CLO which is in OBO. Does your rule also state that there should only be one label per language?

@matentzn
Copy link
Contributor

The language case has not been addressed yet unfortunately.. But my assumption is it will be similar.

@KonradHoeffner
Copy link

KonradHoeffner commented Nov 2, 2022

Our ontologies also have a general rule of one rdfs:label per language maximum, with skos:altLabel for an unrestricted number of synonyms, so I would just pick the first one that the programming language gives me (e.g. iterator.next()) but sorting to get a deterministic order seems fine as well.

As for when there are language tags, we have good experiences with priority lists of language tags in our tools including the empty string.
For example when a tool is configured with ["en", "fr", "", "la"], it will prefer an English label to a French one, prefer both to one with no language tag at all but choose that over one in Latin.

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

No branches or pull requests

3 participants