We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Name: jieba Version: 0.42.1 Summary: Chinese Words Segmentation Utilities Home-page: https://github.com/fxsjy/jieba Author: Sun, Junyi Author-email: [email protected] License: MIT
# encoding=utf-8 import jieba jieba.enable_paddle()# 启动paddle模式。 0.40版之后开始支持,早期版本不支持 strs=["我来到北京清华大学","乒乓球拍卖完了","中国科学技术大学"] for str in strs: seg_list = jieba.cut(str,use_paddle=True) # 使用paddle模式 print("Paddle Mode: " + '/'.join(list(seg_list))) seg_list = jieba.cut("我来到北京清华大学", cut_all=True) print("Full Mode: " + "/ ".join(seg_list)) # 全模式 seg_list = jieba.cut("我来到北京清华大学", cut_all=False) print("Default Mode: " + "/ ".join(seg_list)) # 精确模式 seg_list = jieba.cut("他来到了网易杭研大厦") # 默认是精确模式 print(", ".join(seg_list)) seg_list = jieba.cut_for_search("小明硕士毕业于中国科学院计算所,后在日本京都大学深造") # 搜索引擎模式 print(", ".join(seg_list))
报错:
Traceback (most recent call last): File "/home/project/tmk_mining/test.py", line 4, in <module> jieba.enable_paddle()# 启动paddle模式。 0.40版之后开始支持,早期版本不支持 AttributeError: module 'jieba' has no attribute 'enable_paddle'
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
No branches or pull requests
Name: jieba
Version: 0.42.1
Summary: Chinese Words Segmentation Utilities
Home-page: https://github.com/fxsjy/jieba
Author: Sun, Junyi
Author-email: [email protected]
License: MIT
报错:
The text was updated successfully, but these errors were encountered: