Multi-class classification on top of NER

I deal with raw text data and would like to do both NER and multi class classification at the same time. Ideal flow would be annotating the document first and then in the end instead of binary classification I could choose the categories this document belong to,

Is this possible ? I explored the possibility of doing a custom recipe but the number of possible front ends seem to be too restrictive.

Thanks for your help!

Hi! You could achieve something like this with a custom recipe and two blocks: ner_manual for named entity recognition and choice for multiple choice options. See here for an example that does pretty much the same thing: https://prodi.gy/docs/custom-interfaces#blocks

In general, we do recommend to not do too many things at once, since it can often slow down the annotation process or lead to more inconsistencies because the annotator can't focus on a single objective. Later on, you might also want to use different example selection strategies for NER and text classification and not necessarily annotate the same examples for everything. In that case, it makes sense to do it in two separate steps. When you train or export the data for spaCy later on, all annotations on the same example will be merged automatically.

1 Like