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

修改代码 支持python3.5以上版本 #105

Open
jackycaf opened this issue Jan 6, 2018 · 2 comments
Open

修改代码 支持python3.5以上版本 #105

jackycaf opened this issue Jan 6, 2018 · 2 comments

Comments

@jackycaf
Copy link

jackycaf commented Jan 6, 2018

1)去掉 python 脚本中的 unicode:
例如:process_anno_file.py
ustr = unicode(token.decode('utf8')) # 去掉unicode
2)去掉python脚本中的decode("utf8"):
例如:sentence.py
x.append(vob.GetWordIndex(str(t[0].encode("utf8")))) # 去掉.encode("utf8")

@CrazyMJim
Copy link

@jackycaf
你好我在运行bazel build kcws/train:generate_training这句命令的时候发生了python2转3错误
按照你提的issue改了train目录下的python文件后还是报错
请问能具体说一下怎么改吗?
我把unicode、decode、encode都去掉了
谢谢

@GaoJianchao
Copy link

解决了吗?

@jackycaf
你好我在运行bazel build kcws/train:generate_training这句命令的时候发生了python2转3错误
按照你提的issue改了train目录下的python文件后还是报错
请问能具体说一下怎么改吗?
我把unicode、decode、encode都去掉了
谢谢

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