NatLibFi / Annif

Annif is a multi-algorithm automated subject indexing tool for libraries, archives and museums.
https://annif.org
Other
188 stars 41 forks source link

Support URL locations in `annif load-vocab` #753

Open juhoinkinen opened 6 months ago

juhoinkinen commented 6 months ago

Currently when loading a vocabulary with the command annif load-vocab <VOCAB_ID> <SUBJECTFILE> the location of the subject file needs to be a local path.

Typically when setting up a new project the first step is to download the vocabulary to a local file (e.g. wget "https://finto.fi/rest/v1/koko/data?format=text/turtle" -O koko-skos.ttl) and then running annif load-vocab from it, and after that the local file is no more needed. However, for convenience this could be just one operation, where annif load-vocab could accept also URLs, pointing to the subject file somewhere on internet:

annif load-vocab koko https://finto.fi/rest/v1/koko/data?format=text/turtle
juhoinkinen commented 5 months ago

Maybe in addition to URLs there could be support for also Hugging Face Hub repository locations, aligned with the upload format of the projects upload feature, #760.