##基于自然语言处理的情感分析工具
##请注意:
- pom.xml 文件中 lingpipe-core jar 没办法从中央仓库下载已经集成到 libs 目录里面,而 pom.xml 中只能使用绝对路径,请注意修改
- pom.xml 文件中 hanlp jar 包可能需要手动下载,然后添加到 maven 仓库
###本程序依赖data目录下面的data.zip和dictionary.zip先解压缩 data 目录下面的 data.zip到当前目录。
government,others
###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
最后给出程序测试结果。
# Test Cases=4000
# Correct=3541
% Correct=0.88525