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

cannot cut utf-8 input file, but can cut gbk file #93

Open
l1t1 opened this issue Sep 27, 2019 · 0 comments
Open

cannot cut utf-8 input file, but can cut gbk file #93

l1t1 opened this issue Sep 27, 2019 · 0 comments

Comments

@l1t1
Copy link

l1t1 commented Sep 27, 2019

D:\Python35-32>python -m thulac inputu.txt output.txt seg_only
Model loaded succeed
Traceback (most recent call last):
File "D:\Python35-32\lib\runpy.py", line 184, in run_module_as_main
"main", mod_spec)
File "D:\Python35-32\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "D:\Python35-32\lib\site-packages\thulac_main
.py", line 9, in
lac.cut_f(sys.argv[1], sys.argv[2])
File "D:\Python35-32\lib\site-packages\thulac_init
.py", line 189, in cut_f
for line in input_f:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xb4 in position 42: illegal multibyte sequence

D:\Python35-32>python -m thulac input.txt output.txt seg_only
Model loaded succeed
successfully cut file input.txt!

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