Hello Aurélie,
Annif at least currently doesn't care much what the URIs are; mostly
they are considered opaque identifiers for the concepts/subjects. There
are a few ways the URIs are important though:
1. Annif represents the vocabulary internally using SKOS/RDF, where the
URIs are used as identifiers for concepts. Malformed URIs (for example
containing whitespace) would probably not work. Annif uses rdflib for
RDF handling and it is quite strict about URI syntax.
2. Annif uses the URIs in corpus data files.
3. When Annif gives suggestion results on the command line (suggest
operation) or via the REST API, it will output the URIs alongside labels
and scores.
4. In the Annif web UI, the URIs for suggested subjects are displayed as
clickable links.
Annif never directly accesses (resolves) the URIs via HTTP or other
protocols. So you could even use non-resolvable URIs such as mailto: or
URNs. In fact the "20 newsgroups" example corpus uses news: URIs which
refer to historical Usenet newsgroups from the early days of the Internet.
Cheers,
Osma
On 13/07/2023 18:36, Aurélie Thébault wrote:
> Thanks a lot for your answer Juho, it was exactly that !!
> I have a question regarding the use of URIs by ANNIF. In the vocab
> file, we must provide functional URIs and I am wondering what ANNIF does
> with them. Do you have some inputs to share?
> Thanks a lot to all this group for its efficiency !!
>
> Regards,
>
> Aurélie
>
> Le jeudi 6 juillet 2023 à 09:41:25 UTC+2,
juho.i...@helsinki.fi a écrit :
>
> Hi Aurélie,
>
> I think this has something to do with the loaded vocabulary.
> Actually at first try I could reproduce the same error message you
> are having, but not anymore after trying with some previous Annif
> versions.
>
> Try reloading the vocabulary to Annif (with the "load-vocab"
> command, try also the "--force" option to overwrite the old loaded
> vocabulary to avoid just updating it). Also retraining the project
> could be needed.
>
> Maybe you have updated to Annif v0.59 or newer recently? Annif v0.59
> <
https://github.com/NatLibFi/Annif/releases/tag/v0.59.0> included
> some significant changes in the vocabulary handling, which require
> reloading of previously loaded vocabularies and retraining of
> existing models.
>
> If the problem remains, please post
>
> * project configuration
> * Annif version (output of "annif --version")
> * output of "annif list-vocabs"
> * format of the vocabulary file you load (tsv, csv or some skos
> --
> You received this message because you are subscribed to the Google
> Groups "Annif Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
annif-users...@googlegroups.com
> <mailto:
annif-users...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/annif-users/031015da-e9b7-423e-8bee-ae1408538795n%40googlegroups.com <
https://groups.google.com/d/msgid/annif-users/031015da-e9b7-423e-8bee-ae1408538795n%40googlegroups.com?utm_medium=email&utm_source=footer>.
--
Osma Suominen
D.Sc. (Tech), Information Systems Specialist
National Library of Finland
P.O. Box 15 (Unioninkatu 36)
00014 HELSINGIN YLIOPISTO
Tel.
+358 50 3199529
osma.s...@helsinki.fi
http://www.nationallibrary.fi