Skip to content
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

AttributeError: 'BertTokenizerFast' object has no attribute '_convert_token_to_id' #187

Closed
Somabhadra opened this issue Dec 11, 2020 · 2 comments

Comments

@Somabhadra
Copy link

Somabhadra commented Dec 11, 2020

my code
#BERT Augmentator
TOPK=20 #default=100
ACT = 'insert' #"substitute"

aug_bert = naw.ContextualWordEmbsAug(
model_path='bert-base-multilingual-uncased',
#device='cuda',
action=ACT, top_k=TOPK)
print("Original:")
print(text)
print("Augmented Text:")
for ii in range(5):
augmented_text = aug_bert.augment(text)
print(augmented_text)
please let me know how can i fixed this issue.
transformer=4.0.1
pytorch=1.7.0+cu101
nlpaug=1.1.0

@makcedward
Copy link
Owner

Fixed in nlpaug 1.1.1. Please upgrade it and try again

@Somabhadra
Copy link
Author

Yes fixed it..thanks a lot Mak

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants