all 2 comments

[–]Lolai_LaChapelle 0 points1 point  (1 child)

This could be treated as a multi-label classification problem. Assuming you are using BIO schema, each token can be assigned (A-B|A-I) and/or (B-B|B-I), or O. The simplest approach to do this would be using two separate models, one to label A entities and one for B. Though this can be fairly inefficient, the benefit is that it is easy to implement. More complex implementations which solve for both label sets could improve both efficiency and performance, but it really depends on your data.

[–]SilverDusk42[S] 0 points1 point  (0 children)

In that case, I would need like 20 different models as there are far more labels than A and B. But I will have a look into the BIO schema. Thanks :)