annotate automatically same token occurs in the text

Hi Team,
if i am going to annotate one token in the text, i need automatically annotate same tokens occurs in the text. is there any way in NER manual.

Hi @Bharath,
thank you for your question :slight_smile:
If you know the words that you want to annotate beforehand, you could use a pattern file and the --patterns flag in your ner.manual command.

If you don't know these words beforehand, you could write a custom recipe to add your annotated spans to the Matcher while annotating. In order to achieve this, you need to add an update() function to your recipe. For that, you might want to checkout the following two posts by Ines:

In both update-functions, spans are added to the PatternMatcher during the annotation process.
I hope that this helps you with your problem. Please let me know if you have any further questions.