Custom multilabel categorization recipe

Thanks! :pray:

By default, the buttons are consistent and the same across all interfaces. For thechoice interface, "accept" is of course there to submit the answer, and "undo" can be used to go back to the previous example, e.g. if you've made a mistake and want to correct your answer. "ignore" is typically used to skip an example for whatever reason โ€“ for instance, if the annotator finds the question confusing. This makes it easy to go back over those examples separately later on, clear up confusion, see what the problems are, reannotate them etc.

The "reject" button is a bit less clearly defined in this case. In interfaces like ner.manual, users often use it to specifically mark examples that are wrong and/or broken. For instance, if the tokenization is messy and the desired span can't be selected. It can also be used to create negative examples. For instance, in the new textcat.manual workflow, we also use the multiple choice interface. If you select a label and reject the task, you can basically say: I know that this label is incorrect.

That said, I do see you point for hiding the buttons that would otherwise really confuse the annotators. However, I'd suggest to only hide the "reject" button in that case โ€“ all other buttons do have their place and I think you want to keep the actions for "ignore" and "undo".

Yes, that should hopefully be very straightfgorward with a bit of CSS in the "global_css" setting in the "config" returned by your recipe (where you also put the "choice_style" setting). Whenever you start a recipe, the main page will receive data attributes with the current recipe name and interface ID. This lets you apply styles only for specific recipes or interfaces. The button row has the class .prodigy-buttons, so you can target that as well.

Visually, there are two options here: 1) Hide the button completely. 2) Make it grey and unclickable. The first option is easier, the second a bit more consistent, because the annotators do not have to get used to the buttons being in different positions. So if you're clicking, the buttons aren't suddenly in a different spot.

Here's the CSS for hiding the button โ€“ it's only applied if the Prodigy view ID is "choice" and will hide the second button in the button row:

[data-prodigy-view-id="choice"] .prodigy-buttons button:nth-child(2) {
    display: none;
}

Here's the code for making it grey and unclickable:

[data-prodigy-view-id="choice"] .prodigy-buttons button:nth-child(2) {
    background: #b9b9b9 !important;  /* make it grey */
    opacity: 0.5;  /* make it half transparent */
    cursor: not-allowed;  /* show a "not allowed" cursor  on hover */
    pointer-events: none;  /* disable clicking */
}
1 Like