Question: I want to do sentiment analysis in Python and I need to use NLTK. Now I have my own vocabulary dictionary of positive.txt and negative.txt,

I want to do sentiment analysis in Python and I need to use NLTK. Now I have my own vocabulary dictionary of positive.txt and negative.txt, and also comment.txt. How do I use NLTK to find out the positives and negative words in comment.txt, these words appear in the text of positive.txt and negative.txt. (meet one positive word +1, meet one negative word -1) What is the idea? How to write the code and run the fastest? Thank you!

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!