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 selecting label language in suggest operations #628

Closed
osma opened this issue Oct 3, 2022 · 0 comments · Fixed by #630
Closed

Allow selecting label language in suggest operations #628

osma opened this issue Oct 3, 2022 · 0 comments · Fixed by #630
Assignees
Milestone

Comments

@osma
Copy link
Member

osma commented Oct 3, 2022

The suggest operation (both CLI and REST) always returns the subject labels in the configured vocabulary language, even though the vocabulary could include labels in other languages. For example, YSO is trilingual (fi, sv, en) and thus the subject labels could be given in any of these languages.

We could make it possible to select the subject label language in suggest operations. In the CLI, it could be a parameter -L / --language:

annif suggest -L en yso-mllm-fi <document.txt          # return English language subject labels
annif suggest --language en yso-mllm-fi <document.txt  # same but with long option

In the REST API, it could be a parameter lang or language that works similarly to the current limit and threshold parameters.

Currently the Finto AI user interface has similar functionality, but it relies on the Finto REST API to fetch labels in non-default languages. Having this available in the Annif API would simplify the implementation.

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

Successfully merging a pull request may close this issue.

1 participant