Load set of skos files

25 views
Skip to first unread message

Sefiane Touhami

unread,
Feb 10, 2022, 9:16:05 AM2/10/22
to Annif Users
Hi all,

Is the command "annif loadvoc" allows to load a tar file which contains a set of skos files ?

BR.

Sefiane.

juho.i...@helsinki.fi

unread,
Feb 10, 2022, 9:59:40 AM2/10/22
to Annif Users

Hi,

No, loadvoc command cannot handle a tar-archive of vocabulary files. And not multiple vocabulary files in any way: currently the vocabulary to load needs to be one file, in some of the supported formats: https://github.com/NatLibFi/Annif/wiki/Subject-vocabulary-formats

Maybe you can write the terms of each individual SKOS files into tsv files, which could then just be concatenated together to one tsv file? Or possibly there is a tool to concatenate SKOS files directly to one? Surely someone here knows more about the SKOS tools than me.

-Juho

Sefiane Touhami

unread,
Feb 10, 2022, 1:22:26 PM2/10/22
to Annif Users
Thank you so much Juho !

Osma Suominen

unread,
Feb 11, 2022, 6:57:49 AM2/11/22
to annif...@googlegroups.com
Hi,

for merging SKOS files you can use any RDF tools. For example, rdflib
(which is used in Annif) comes with the utility rdfpipe, which works
well for this although it can be a bit slow. For example, to merge two
SKOS files into a single Turtle file, you can use a command like this:

rdfpipe file1.ttl file2.ttl -o turtle >merged.ttl

Hope this helps!

-Osma
> --
> 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/65448fba-88e8-450c-a0fb-6d47bb55450dn%40googlegroups.com
> <https://groups.google.com/d/msgid/annif-users/65448fba-88e8-450c-a0fb-6d47bb55450dn%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
Reply all
Reply to author
Forward
0 new messages