from snownlp import SnowNLPtext='宝贝自拍很帅!!!注意休息~' s=SnowNLP(text) #分词print(s.words) #词性for tag in s.tags: print(tag) #情感度,积极的概率print(s.sentiments) #关键词print(s.keywords(10))print(s.tf)print(s.idf)