首页
技术
登录
6mi
u
盘
搜
搜 索
技术
jieba分词 ‘float‘ object has no attribute ‘decode‘ 解决方法
jieba分词 ‘float‘ object has no attribute ‘decode‘ 解决方法
技术
2023-10-02
78
分词的时候碰到float类型了,将你要分词的内容强转成str一下就行
之前的代码:
a
=
len
(
list
(
jieba
.
cut
(
train_fea
[
0
]
,
cut_all
=
False
)
)
)
之后的代码:
a
=
len
(
list
(
jieba
.
cut
(
str
(
train_fea
[
0
]
)
,
cut_all
=
False
)
)
)
转载请注明原文地址:https://ipadbbs.8miu.com/read-45002.html
最新回复
(
0
)