I have a string such as "xxx yyy zzz" and I am using the BERT tokenizer from Huggingface:
from transformers import BertTokenizer
tokenizer = BertTokenizer.from_pretrained("bert-base-uncased")
mylistoftoken = tokenizer.tokenize("xxx yyy zzz")
However, I want to be able to enforce that certain words (for example "abcd") should not be subtokenized into subwords ("aa" and "##bb" or something of that sort).
Is there a way for me to enforce that without post-processing the array of tokens and putting them back together?