Not at the moment – mostly because this type of logic should be pretty easy to implement using the existing interfaces and a simple custom recipe See this page for an example of the choice
interface. Depending on your label scheme, you can set "choice_style": "multiple"
in your config to allow multiple selection, or "choice_auto_accept": true
to automatically accept a task if an option was selected.
The only difference to the manual NER recipes is that a solution using the choice
interface will produce more “general” data – i.e. it won’t set the "label"
specifically and instead, list the options the user selected. For example, if your options have the IDs 1
, 2
and 3
and the user selects the first two, the task will include "accept": [1, 2]
. This should be fairly easy to convert, though. For example:
textcat_examples = []
for example in CHOICE_EXAMPLES: # the exported examples
for option_id in example.get('accept', []): # iterate over accepted ids
eg = dict(example) # copy task
eg['label'] = option_id # set label
textcat_examples.append(eg)