-
Notifications
You must be signed in to change notification settings - Fork 8
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
Incorrect prefLabel chosen when multiple language labels are defined #91
Comments
This ontology does not explicitly set the property: http://www.w3.org/2004/02/skos/core#prefLabel, which means, the prefLabel property is determined using the http://www.w3.org/2000/01/rdf-schema#label property. The latter may contain multiple entries, one for each specified language. Ex:
The code that sets the prefLabel property is located here: The code that simply picks the first label on the list is located here: The code on line 652 must instead examine whether an instance of :EN language label exists and pick its value instead of picking the first value in the array. |
This issue is related to the previously addressed issue in JIRA: https://jira.bmir.stanford.edu/browse/NCBO-1662 |
We have fixed this in SIFR and AgroPortal. We have a parameter to choose the default language. |
If I understand our status correctly we have it working (to just show English first) for skos:prefLabel, but not for rdfs:label. @vemonet It would be great to have a pointer to your code for the choice of default language. I assume that works for both rdfs:label and skos:prefLabel? Also, I see the issue in annotations when annotating the default string, the 10th or so row for 'melanoma' puts up a Chinese label. |
@jonquet are you in a position that you could make a pull request to make it possible to choose the default language? |
An end user reported another instance of this issue today for the ontology with acronym TERRADCAT_AP. One example is the class with an English language label of "Distribution". BioPortal displays the Arabic language label in the class tree: This particular class comes from the imported DCAT ontology. DCAT is maintained in GitHub where you can view the declaration for the Distribution class, along with the multiple language labels:
|
No. This is 7 years old now. |
Hi @jonquet and @graybeal , sorry never noticed the notifications from this issue before I remember we had some Java to clean ontologies with multiple labels, but not sure about choosing the default language, would need more details/example In this case it seems to be a problem specifically related to You can fix it via the calls done to resolve labels when But it would probably be better to fix it downstream, when the main prefLabel is picked, so you don't need to rely on this call everytime the class is accessed |
We are working on anew strategy/algorithm for this and will keep you updated soon. |
Feature: Support multi lingual - add show_language argument to the attributes getters
When ontology defines RDFS labels in multiple languages for a given class, BioPortal picks a random (the first one in the array) label to be designated as the prefLabel.
Example: TXPO ontology (this ontology is private, must be an admin to view). Some of the classes are displayed in English and some are in Japanese.
The text was updated successfully, but these errors were encountered: