You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is related to #2917. In the slow tokenizers, when do_lower_case=False we don't strip accents, while we do it when do_lower_case=True. In the fast tokenizers, this is controlled by the strip_accents option, which is True here.
🐛 Bug
Information
Model I am using (Bert, XLNet ...): BERT
Language I am using the model on (English, Chinese ...): 'bert-base-multilingual-cased'
The problem arises when using:
The tasks I am working on is:
To reproduce
Steps to reproduce the behavior:
from transformers import *
tokenizer = BertTokenizerFast.from_pretrained('bert-base-multilingual-cased')
tokenizer.decode(tokenizer.encode('mở bài lạc trôi'))
--> wrongbut:
from transformers import *
tokenizer = BertTokenizer.from_pretrained('bert-base-multilingual-cased')
tokenizer.decode(tokenizer.encode('mở bài lạc trôi'))
--> trueExpected behavior
the decode sentence after encoding and decoding using TokenizerFast should be true
Environment info
transformers
version:The text was updated successfully, but these errors were encountered: