Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
gitclebeg 0c11ad6d1f | 9 years ago | |
---|---|---|
data | 9 years ago | |
libs | 9 years ago | |
src | 9 years ago | |
.gitignore | 9 years ago | |
README | 9 years ago | |
pom.xml | 9 years ago |
基于自然语言处理的情感分析工具
本程序依赖data目录下面的data.zip,先解压缩 data 目录下面的 data.zip到当前目录。
*新增说明1:2015-04-10测试了不用中文分词器,分词之后 LingPipe 情感分类的准确率,同时测试了去除停用词之后的情感分类的准确率。
1) 发现用HanLP的NLPTokenizer分词器,准确率最高,但是速度有点慢。
2) 如果用HanLP的标准分词器就会准确率低一点点,但是速度快。
3) 分词之后去除停用词效果更加差。
4) 结巴分词效果不好,而且速度慢。
1、基于词典和贝叶斯模型的情感分析
主程序:eshore.cn.it.sentiment.Sentiment 此类通过
data/Sentiment_Dictionary中的正负面词语建立模型。
测试: eshore.cn.it.sentiment.SentimentTest
通过这个类就可以测试 data/500trainblogxml中的某个文件夹下面的博客的情感。
2、直接利用lingpipe的情感分析模块测试情感分析
直接运行程序: eshore.cn.it.sentiment.ChinesePolarityBasic
程序就会通过: data/polarity_corpus/hotel_reviews/train2训练
然后自动测试: data/polarity_corpus/hotel_reviews/test2
最后给出程序测试结果。