Mix choice_style between single and multiple

Hey,

for our text analysis we annotate newspaper articles where we have multiple "groups" of categories, such as topic and sentiment.

The category topic is non-mutually-exclusive (e.g. it can be zero, one or more of [science, consumer products, health, politics]

The category sentiment is mutually-exclusive (e.g. [positive, neutral, negative])

So we are planning to go through each text only once which would mean that both of these categories are loaded. We use "view_id": "choice" and so my question is if it is possible to separate the view's categories somehow into groups with different settings regarding their choice_style? Like for one we would use "multiple" for the other "single".

My guess is that this is not possible because it would imply quite a different configuration structure than what I have seen prodigy usually providing. I would then probably have to set it to to multiple for all and tell our annotators to take good care to only pick one from the sentiment category?

It's not something we'd usually recommend because it makes the collected data inconsistent, but it's possible in Prodigy v1.10+ by setting the "choice_style" in the "config" dict of each task instead of just at the top level:

{"text": "...", "options": [...], "config": {"choice_style": "multiple"}}
{"text": "...", "options": [...], "config": {"choice_style": "single"}}

In general, if there's a way to enforce the annotation policy via the UI (e.g. "select only one" by actually allowing only one selection), it definitely makes sense to do it. (You can now also use the validate_answercalback to perform additional checks if needed.)

Nice! Thank you Ines, I will follow this then.

1 Like