If I understand correctly you need token classification. Example here: https://github.com/huggingface/transformers/tree/master/examples/token-classification 3
You can assign a label to each token you have. I think you will need to consider each “letter” a token.