简体   繁体   English

N克用于情感分析

[英]N grams for Sentiment Analysis

I am doing sentiment analysis on reviews of products from various retailers. 我正在对来自各个零售商的产品评论进行情绪分析。 I was wondering if there was an API that used n grams for sentiment analysis to classify a review as a positive or negative. 我想知道是否有一个使用n克进行情感分析的API将评论归类为肯定或否定。 I have a CSV file filled with reviews which I would like to run it in python and hence would like an API or a package rather than a tool. 我有一个充满评论的CSV文件,我想在python中运行它,因此想要一个API或一个包而不是一个工具。 Any direction towards this would be great. 对此的任何方向都是很好的。

Thanks 谢谢

Use textblob package. 使用textblob软件包。 It offers a simple API to access its methods and perform basic NLP tasks. 它提供了一个简单的API来访问其方法并执行基本的NLP任务。 NLP is natural language processing. NLP是自然语言处理。 Which process your text by tokenization, noun extract, lemmatization, words inflection, NGRAMS etc. There also some other packages like spacy, nltk. 通过标记化,名词提取,词形化,单词变形,NGRAMS等处理文本。还有其他一些软件包,例如spacy,nltk。 But textblob will be better for beginners. 但是textblob对于初学者来说会更好。

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

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