How to use BERT for ENTITY extraction from a Sequence without classification in the NER task ?
## ❓ Questions & Help

<!-- A clear and concise description of the question. -->
My requirement here is given a sentence(sequence), I would like to just extract the entities present in the sequence without classifying them to a type in the NER task. I see that BERT has BertForTokenClassification for NER which does the classification.

So, can somebody give me an idea of how to do **entity extraction/identification using BERT**?
I'm a bit confused: you're basically defining the broad case of named entity recognition. Is it not enough to have a binary NER (token-level classification) task for entity vs non-entity?<|||||>Assuming you have 3-class (PER, ORG, LOC) data with labels:
B-PER, I-PER, B-ORG, I-ORG, B-LOC, I-LOC, as well as O

Replace PER, ORG, LOC with ENT.
This leaves you with these labels:
B-ENT, I-ENT, O

You can do this before training, and then train a model specifically for 1-class named entity detection only.
Or you can do this as a post-processing step on the output of the normal 3-class model.<|||||>@bheinzerling Thank you!!
 I will try this.