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

Allow to get suggestion labels in Northern Sami #18

Open
wants to merge 3 commits into
base: update-2024
Choose a base branch
from

Conversation

juhoinkinen
Copy link
Member

@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

@juhoinkinen
Copy link
Member Author

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.

@juhoinkinen juhoinkinen changed the base branch from main to update-2024 October 30, 2024 08:18
Comment on lines 439 to 447
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];
Copy link
Member Author

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.

@@ -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>
Copy link
Member Author

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.

@juhoinkinen
Copy link
Member Author

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.

Now the Sami item is disabled in the labes language menu when the selected project is not some YSO project, e.g. when PLC Finnish (i.e. YKL suomi) is selected:
image

@juhoinkinen juhoinkinen marked this pull request as ready for review October 30, 2024 12:46
@juhoinkinen
Copy link
Member Author

The branch-to-merge-into is update-2024, because also at least #21 could be included to the next Finto AI update; so update-2024 could be merged to main branch to get all the updates in go.

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

Successfully merging this pull request may close these issues.

1 participant