Nagisa7
Nagisa7
采纳率40%
2021-02-28 11:19

使用jieba弹出如下错误

import jieba

seg_list = jieba.cut("我来到北京清华大学", cut_all=True)
print("Full Mode: " + "/ ".join(seg_list)) # 全模式
print(seg_list)

text1 = '李小福是创新办主任也是云计算方面的专家'
jieba.load_userdict('userdict.txt') # file_name为自定义词典的路径
seg_list1 = jieba.cut(text1, cut_all=False)
print("/ ".join(seg_list1))

partially initialized module 'jieba' has no attribute 'cut' (most likely due to a circular import)

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • Nagisa7 Nagisa7 2月前

    错误是:partially initialized module 'jieba' has no attribute 'cut' (most likely due to a circular import)

    点赞 评论 复制链接分享