I am using a MarianMTModel and the corresponding MarianTokenizer for translation. I have specific words in the texts what I don’t want to translate, but preserve in the original format ([XY]).
I have already tried to deactivate attention for those sub-words and add the tokens to additional_special_tokens.
How can I skip these tokens during translation?
Berlin is a nice city. -> [CITY] is a nice city. -> [CITY] ist eine schöne Stadt.