You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The annif loadvoc command currently takes a project ID as a parameter, like this:
annif loadvoc yso-tfidf-fi path/to/yso.ttl
But this can be a bit misleading, because the same vocabulary could be used by many other projects and thus their vocabulary will be loaded/updated as well. The problem will be even more prominent after implementing #559 / #600 , which makes vocabularies multilingual, and thus even projects in different languages may share the same vocabulary (and vocabulary id).
I suggest changing this so that the loadvoc command instead takes a vocabulary ID, like this:
annif loadvoc yso path/to/yso.ttl
This would align better with current reality, but of course it's a potentially disruptive change, since for example scripts that perform loadvoc operations have to be modified and all the relevant documentation updated, including the Annif tutorial. There could perhaps be a transition period where loadvoc with a project id keeps working but prints a deprecation warning...
There's also the question of how to deal with languages, especially when loading a vocabulary from a TSV file. Currently the language of a TSV vocabulary is inferred from the project configuration. But if the vocabulary is loaded directly, there is no project configuration, so the language may need to be specified directly, for example with a --language option (shortened to -L which is not otherwise used in current CLI commands). This would also be useful for SKOS vocabularies that lack language tags, as discussed in #556.
The text was updated successfully, but these errors were encountered:
Based on a suggestion by @juhoinkinen , I think this would be a better approach:
Keep the loadvoc command around for a while (one release cycle?) in its current form, but mark it as deprecated and print a warning message when it is used.
Add new commands load-vocab, list-vocabs, show-vocab and possibly other similar ones as well (not necessarily all of them implemented at once). These would all work on vocabulary IDs instead of project IDs and would be analoguous to the list-projects and show-project commands.
The
annif loadvoc
command currently takes a project ID as a parameter, like this:But this can be a bit misleading, because the same vocabulary could be used by many other projects and thus their vocabulary will be loaded/updated as well. The problem will be even more prominent after implementing #559 / #600 , which makes vocabularies multilingual, and thus even projects in different languages may share the same vocabulary (and vocabulary id).
I suggest changing this so that the
loadvoc
command instead takes a vocabulary ID, like this:This would align better with current reality, but of course it's a potentially disruptive change, since for example scripts that perform loadvoc operations have to be modified and all the relevant documentation updated, including the Annif tutorial. There could perhaps be a transition period where loadvoc with a project id keeps working but prints a deprecation warning...
There's also the question of how to deal with languages, especially when loading a vocabulary from a TSV file. Currently the language of a TSV vocabulary is inferred from the project configuration. But if the vocabulary is loaded directly, there is no project configuration, so the language may need to be specified directly, for example with a
--language
option (shortened to-L
which is not otherwise used in current CLI commands). This would also be useful for SKOS vocabularies that lack language tags, as discussed in #556.The text was updated successfully, but these errors were encountered: