Can I use NLTK to determine if a comment is a positive one or a negative one?

后端 未结 4 1338
一个人的身影
一个人的身影 2021-02-09 02:18

Can you show me a simple example using http://www.nltk.org/code to determine if a string about a happy or upset mood?

4条回答
  •  自闭症患者
    2021-02-09 02:45

    NLTK cannot out of the box, but if you are looking for some related research on that area, take a look at this paper on Offensive Language Detection. The same methods could be adapted to detect comments which are not offensive/unoffensive, but instead happy/unhappy. The primary software package being used in this project for text classification is called WEKA and uses multiple classifiers, trained on previous examples, to determine whether language is offensive or not (and in this method uses a tunable threshold).

提交回复
热议问题