Bert, NLP.
Let’s find the index of those three instances of the word “bank” in the example sentence. for i, token_str in enumerate(tokenized_text): print (i, token_str) 0 [CLS] 1 after 2 stealing 3 money 4 from 5 the 6 bank 7 vault 8 , 9 the 10 bank 11 robber 12 was 13 seen 14 fishing 15 on 16 the 17