As you can see the label property is stated in the command and prodigy recognizes it when initiating the server. However, once I open the web app the label isn't recognized in the incoming example stream and prodigy crashes.
Hmm, okey so seems like it was my understanding of the textcat.manual interface that was lacking… I added another label-parameter and now it works. It seems the textcat.manual interface is built to just be able to choose between different labels?
What I really wanted was to take a long chunk of text and manually highlight and classify certain spans of that text with a single label. Kind of like the ner.manual recipe.
Any suggestions @ines?
Thanks for the report – I’ll have a look This might actually be a bug, because it should work pretty much as you expected: if you provide more than one label, you get a multiple choice interface (most common use case), and if you only add one label, you get the basic classification interface where you accept/reject the single label.
But I think the problem is that the label isn’t correctly added to the stream. Here’s a quick workaround for now – just add this this at the end of the recipe script in recipes/textcat.py:
def add_label_to_stream(stream, label):
for eg in stream:
eg["label"] = label[0]
yield eg
if has_options:
stream = add_label_options(stream, label)
else:
stream = add_label_to_stream(stream, label)
To find the location of your Prodigy installation, you can run the following command: