Created
May 4, 2021 01:53
-
-
Save wfng92/76863e680346fc3666980c893181f541 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from snownlp import SnowNLP | |
text = SnowNLP(u'这个产品很好用,这个产品不好用,这个产品是垃圾,这个也太贵了吧,超级垃圾,是个垃圾中的垃圾') | |
sent = text.sentences | |
for sen in sent: | |
s = SnowNLP(sen) | |
print(sen, s.sentiments) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment