"Object" Detection in Textual Data
This looks quite similar to Named Entity Recognition (NER), which is traditionally done with a sequence labeling model such as Conditional Random Fields. Normally NER is used when:

The list of possible entities is not predefined: the training data might contain &quot;Mr James Smith&quot; but the test data could contain &quot;Mr John Doe&quot;. In other words, the classes are open.
It is assumed that the context of the text can help the model predict an entity. For example in a sentence like &quot;Today X said that ...&quot;, the word &quot;said&quot; after X should help the model predict that X is either a person or an organization, but it cannot be a location.