-
Notifications
You must be signed in to change notification settings - Fork 25.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BertTokenizer and encode_plus() #9655
Comments
No it’s still there and still identical. It’s just that you made a typo and typed Though we recommand using just the |
Oops sorry I completely missed that. Thank you! |
long_text = "This is a very very long text. " * 300 tokenize without truncationinputs_no_trunc = tokenizer.encode_plus(long_text, add_special_tokens=False, return_tensors='pt') I get the following error: AttributeError: 'BertTokenizer' object has no attribute 'encode_plus' Is their a substitution for this? |
I see that from version 2.4.0 I was able to use
encode_plus()
withBertTokenizer
However it seems like that is not the case anymore.
AttributeError: 'BertTokenizer' object has no attribute 'encoder_plus'
Is there a replacement to
encode_plus
?The text was updated successfully, but these errors were encountered: