Prodigy's textcat.batch-train
recipe is optimised to train from binary annotations, so if you have data in this format, you can train your model using the built-in workflow.
If you want to convert data collected with the choice
interface to the binary accept/reject format, you might also find this thread relevant:
This is also an option. If you've collected data using the choice
interface, you could then do something like this:
options = ['LABEL_A', 'LABEL_B', 'LABEL_C']
data = [] # use this for training later
for eg in examples:
accepted = eg.get('accept', [])
cats = {label: label in accepted for label in options}
data.append(eg['text'], cats)
Basically, you just need to check whether the "accepted"
list of your annotated data includes the label (label was seleted by the user and should apply) or whether it doesn't. The above code will produce data in the following format, which you can use to train your model in spaCy:
data = [
('Hello world', {'LABEL_A': True, 'LABEL_B': False, 'LABEL_C': True})
]