-
Notifications
You must be signed in to change notification settings - Fork 0
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
Allow to get suggestion labels in Northern Sami #18
base: update-2024
Are you sure you want to change the base?
Conversation
TODO: For this it is still necessary to restrict the languages selectable in "Suggestions language" menu depending on the project, because YKL and KAUNO vocublaries do not support Sami: a JS TypeError occurs if one tries to get suggestions in Sami when using YKL or KAUNO. |
ai.finto.fi/static/js/annif.js
Outdated
props: ['modelValue', 'selected_project'], | ||
emits: ['update:modelValue'], | ||
computed: { | ||
vocabularyId() { | ||
// TODO: This is a hack. We should expose the vocabulary id from Annif API. | ||
// Why project is here the project_id string? | ||
// Assume vocabulary id is a prefix | ||
if (this.selected_project) { | ||
return this.selected_project.split("-")[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not use camelCased name selectedProject
in this method/component, but only selected_project
worked.
ai.finto.fi/index.html
Outdated
@@ -163,7 +163,7 @@ <h3>{{ $t('suggestions_label') }}</h3> | |||
|
|||
<project-select v-model="selected_project" :projects="projects"></project-select> | |||
<limit-input v-model="limit"></limit-input><br> | |||
<language-select v-model="language"></language-select> | |||
<language-select v-model="language" :selected_project="selected_project"></language-select> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renaming selected_project
to selectedProject
did not affect the props name on line 439.
The branch-to-merge-into is |
@osma noted that now when Annif behind Finto AI uses an YSO version in which (some) concepts have labels in Sami (in addition to Finnish, Swedish and English), there could be an option in the "Suggestions language" menu for Sami (this menu just sets the language of the labels, independent on the selected project).
This (draft) PR adds that option.
However, currently those labels that don't have (yet) the label in Sami are displayed as "YSO identifiers" like
yso:p334
in the suggestion results list. There could be some fallback display option for these cases, like showing the label in the language of the web site inside parentheses.Anyway, we could post pone this until the next model update round.
FYI @nikopartanen