当前位置:网站首页>nlp 评论分类实现总结
nlp 评论分类实现总结
2022-08-08 23:56:00 【马达马达达】
(持续更新中。。。。。。)
根据评论发现有用的数据,主要目的是
1.版本更新说明
2.根据评论分类,发觉需要改进的问题。首先确认是否是我们产品的问题,然后找出问题的分类:比如性能问题,业务问题,等等。
伪代码
1.加载数据 read_csv() 注意编码格式
2.用jieba将每行分词
3.找出所有语料库dict(最耗时的步骤)
去掉低频词高频词(低高频词对分类没有很高的实际价值)
去特殊字符,标点符号
把语料库的空字符转成 '无字典数据' :
df_comment_word_list[df_comment_word_list.iloc[:,-1]=='']='无字典数据' (以一个java程序员的视角,这行python代码简直是在变魔术)
4.转成词向量,使用不同的聚类算法测试,(推荐Biopython.kcluster,可以使用聚类的不同距离类型),来选择最合适的算法。
https://github.com/biopython/biopython
坑:
FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
if hasattr(X, 'dtype') and np.issubdtype(X.dtype, np.float):
https://blog.csdn.net/qq_41185868/article/details/80276847
边栏推荐
猜你喜欢
随机推荐
pytorch常用代码
RHCSA--第二天
pytorch 使用torch.autograd.grad 求导
Get the start time of the week
获取半年前当月的开始时间及当天结束时间
Get the current week time excluding the current day
C#数据流
mysql主从复制
使用 Gradio 在 huggingface 创建应用 Space
第一章 数据库系统概述
【深度学习】TensorFlow学习之路五:DNN防止过拟合的几种方法及TensorFlow实现
win10电脑:电脑触摸板控制
postgresql源码学习(35)—— 检查点⑤-检查点中的XLog清理机制
并发编程第9篇,Condition
08 Spark on RDD 依赖关系
C#WPF简述
51nod 2882最短路 (树链剖分)
gptp协议
跨域请求浏览器无法显示set-cookie,坑了我一晚上
读书笔记怎么写?