jieba分词出现以下错误:AttributeError: 'float' object has no attribute 'decode'

在利用结巴(jieba)进行分词时出现以下错误,AttributeError: 'float' object has no attribute 'decode': 真实挺无语的,当读取编码为utf8时不会报错,当读取为gbk时会报这类错误,这个能够解决不少此类型的错误。python 原始内容: def cutword(x): seg = jieba.cut(x) #结巴分词函数
相关文章
相关标签/搜索