简体   繁体   English

将Sentiwordnet与TextBlob一起使用

[英]Using Sentiwordnet with TextBlob

Is there a way I can conduct sentiment analysis with TextBlob, as NLP, using Sentiwordnet, as it's corpora database? 我有没有办法使用Sentiwordnet(作为语料库数据库)使用TextBlob(作为NLP)进行情感分析?

Currently, I believe TextBlob is using other corpora databases to do sentiment analysis from the download_corpora.py, but I do not know which ones are actually being used for the analysis. 目前,我相信TextBlob正在使用其他语料库数据库从download_corpora.py进行情感分析,但是我不知道分析中实际上使用了哪些。

(I know I can use NLTK, but I find TextBlob more powerful, as it calls NLTK.) (我知道我可以使用NLTK,但是我发现TextBlob更强大,因为它称为NLTK。)

I believe what OP is asking is, is there a SentiWordNet model NLTK that can be used in TextBlob. 我相信OP在问的是,是否存在可以在TextBlob中使用的SentiWordNet模型NLTK。

Out of the box, the answer is no. 开箱即用,答案是否定的。

From TextBlob's wiki: The textblob.sentiments module contains two sentiment analysis implementations, PatternAnalyzer (based on the pattern library) and NaiveBayesAnalyzer (an NLTK classifier trained on a movie reviews corpus). 来自TextBlob的Wiki:textblob.sentiments模块包含两个情感分析实现,PatternAnalyzer(基于模式库)和NaiveBayesAnalyzer(经过电影评论语料库训练的NLTK分类器)。 https://textblob.readthedocs.io/en/latest/advanced_usage.html#sentiment-analyzers https://textblob.readthedocs.io/zh-CN/latest/advanced_usage.html#sentiment-analyzers

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

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