简体   繁体   English

使用sentiwordnet在文件中标记评论

[英]Label reviews in file using sentiwordnet

I'm very new to Sentiment analysis and need some guides. 我对情感分析非常陌生,需要一些指导。 I have a text file of movie reviews and I want to label each review with pos/neg score using sentiwordnet. 我有一个电影评论的文本文件,我想使用sentiwordnet为每个评论加上pos / neg分数。 What steps I should follow to do that? 我应该遵循哪些步骤进行操作?

You should check out NLTK. 您应该签出NLTK。 The package has an interface for sentiwordnet that is simple to use. 该软件包具有一个易于使用的sendiwordnet接口。 http://www.nltk.org/howto/sentiwordnet.html http://www.nltk.org/howto/sentiwordnet.html

As for the actual sentiment analysis, there are a lot of guides on how to train machine learning models for this task. 至于实际的情绪分析,有很多关于如何为该任务训练机器学习模型的指南。 And sentiwordnet scores can used as features for the classifier. 而sendiwordnet分数可用作分类器的功能。

If you want to use just that alone, the simplest model would be to sum the scores of all the words in the review and make a final judgement. 如果您只想单独使用它,最简单的模型是将评论中所有单词的分数相加并做出最终判断。

Check out http://sentiment.christopherpotts.net/ if you want a simple starter to sentiment analysis. 如果您想要简单的入门者来进行情感分析,请查看http://sentiment.christopherpotts.net/

Edit - Some more guides https://marcobonzanini.com/2015/01/19/sentiment-analysis-with-python-and-scikit-learn/ 编辑-其他一些指南https://marcobonzanini.com/2015/01/19/sentiment-analysis-with-python-and-scikit-learn/

http://mlwave.com/movie-review-sentiment-analysis-with-vowpal-wabbit/ http://mlwave.com/movie-review-sentiment-analysis-with-vowpal-wabbit/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM