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

运行main.py时报错:not enough values to unpack #22

Closed
iblackholmes opened this issue Apr 30, 2020 · 1 comment
Closed

运行main.py时报错:not enough values to unpack #22

iblackholmes opened this issue Apr 30, 2020 · 1 comment

Comments

@iblackholmes
Copy link

运行'python main.py'时,出现如下错误:

>python main.py
读取数据...
Traceback (most recent call last):
  File "main.py", line 73, in <module>
    main()
  File "main.py", line 14, in main
    build_corpus("train")
  File "data.py", line 16, in build_corpus
    word, tag = line.strip('\n').split()
ValueError: not enough values to unpack (expected 2, got 0)
@iblackholmes
Copy link
Author

噢,问题解决了。参考#15
是data.py第16行,识别空行的判别改成" if line != '\r\n'"即可。

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

1 participant