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

get_vocab.py运行出错 #5

Open
bigcat2333 opened this issue Mar 18, 2019 · 2 comments
Open

get_vocab.py运行出错 #5

bigcat2333 opened this issue Mar 18, 2019 · 2 comments

Comments

@bigcat2333
Copy link

您好,在运行get_vocab.py时报出错误
Traceback (most recent call last):
File "lib/get_vocab.py", line 89, in
get_vocab(train_file, dev_file)
File "lib/get_vocab.py", line 61, in get_vocab
raise ValueError('The length of dev word is 0')
ValueError: The length of dev word is 0
想请教一下这个该如何解决呢?

@hweidream
Copy link
Collaborator

这个异常是因为从dev_data.json中读数据异常,你检查下这个文件的编码等问题,可以debug下get_vocab.py中的load_word_file函数看看

@taotao033
Copy link

taotao033 commented Mar 26, 2019

您好,在运行get_vocab.py时报出错误
Traceback (most recent call last):
File "lib/get_vocab.py", line 89, in
get_vocab(train_file, dev_file)
File "lib/get_vocab.py", line 61, in get_vocab
raise ValueError('The length of dev word is 0')
ValueError: The length of dev word is 0
想请教一下这个该如何解决呢?

I guess that you also use python3. I delete decode('utf-8'), and fix it. You can try do it.

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