Skip to content

TypeError: _tokenize() got an unexpected keyword argument 'add_prefix_space' #11

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

Open
r-mohammadi opened this issue May 27, 2021 · 1 comment

Comments

@r-mohammadi
Copy link

Hi
In the preprocess, when we use albert model in 5_dump_features, we get this error:
TypeError: _tokenize() got an unexpected keyword argument 'add_prefix_space'
but it works fine for roberta model

@oldkong
Copy link

oldkong commented Jun 18, 2021

Hi
In the preprocess, when we use albert model in 5_dump_features, we get this error:
TypeError: _tokenize() got an unexpected keyword argument 'add_prefix_space'
but it works fine for roberta model

I think your error comes from line 353: sub_tokens = tokenizer.tokenize(token, add_prefix_space=True)

you can try to overwrtie it by: sub_tokens = tokenizer.tokenize(token)

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