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

TypeError: unhashable type: 'list' #76

Open
SmartMapple opened this issue Feb 24, 2022 · 2 comments
Open

TypeError: unhashable type: 'list' #76

SmartMapple opened this issue Feb 24, 2022 · 2 comments

Comments

@SmartMapple
Copy link

when i use run_ner_crf.py, i want switch to xlnet model to do ner, i come aross follow error:
File "pytorch_version\models\transformers\tokenization_utils.py", line 639, in split_on_tokens if sub_text not in self.added_tokens_encoder \ TypeError: unhashable type: 'list'
my configuration is:
'xlnet': (XLNetConfig, XLNetCrfForNer, XLNetTokenizer)
i thought this is caused by tokenize process, but i cannot locate the error
appreciate for your help

@YueCongPKU
Copy link

YueCongPKU commented Feb 24, 2022 via email

@JinFish
Copy link

JinFish commented Sep 15, 2022

这个方法的目的是为了将文本分割为一个个token,但实际上在数据的预先处理中就已经将文本分割为token了,这一步实属没有必要。
而且这个方法不能接收list类型,只能接受str类型。

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

3 participants