Python学习笔记之 中英文文本情感分析
代码#英文情感分析 textblobfrom textblob import TextBlobimport nltktext = 'I am so happy. I am so sad.'blob = TextBlob(text)print(blob)print(blob.sentences)print(blob.sentences[0].sentiment)print(blob.sentences[1].sentiment)print(blob.sentiment)#中文情感分析S