Error with Setting up New Vocabulary

35 views
Skip to first unread message

Amelia Mowry

unread,
Oct 19, 2023, 11:01:47 AM10/19/23
to Annif Users
Hi,

We're doing some experimenting with Annif. I've worked through the tutorials, and I've been trying to add a new project and vocabulary based on what I did in the tutorial. I added a project to projects.cfg, but I get the following error when when I use annif list-projects to confirm: "ValueError: Invalid vocabulary specification: "VocabT1""

This is what my projects.cfg looks like:

[VocabT1 tfidf]
name="Test 1 tfidf"
language="en"
backend="tfidf"
vocab="VocabT1"
analyzer="snowball(english)"

And this is my file structure in docker:
annif-projects
     data-sets(folder with training data and tsv vocab)
     projects.cfg
     
Does anyone know what could be causing this error?

Thank you,

Amelia



Osma Suominen

unread,
Oct 23, 2023, 2:26:28 AM10/23/23
to annif...@googlegroups.com
Hi Amelia!

I think you're using the wrong configuration file syntax. Your
configuration uses quoted values so it looks like TOML, but in that case
the file should be named projects.toml, not .cfg which implies the
simpler INI-style syntax where values are generally not quoted.

Also, the project ID [VocabT1 tfidf] has a space in it which probably
won't work.

-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/f3ca713c-3611-42d2-b9b3-f28a7779bbd6n%40googlegroups.com <https://groups.google.com/d/msgid/annif-users/f3ca713c-3611-42d2-b9b3-f28a7779bbd6n%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